- BHLBCK ; cmi/flag/maw - BHL Check a background task ;
- ;;3.01;BHL IHS Interfaces with GIS;**2,11,14**;OCT 15, 2002
- ;
- ;
- ;this routine will check to see if the task is active and shutdown and
- ;restart on the fly if not.
- ;
- CHK(BP,SH) ;EP - check the task status
- S BP=$O(^INTHPC("B",BP,0))
- I 'BP Q 1
- I $$VER^INHB(BP) Q 1
- D SHUT
- H 10
- D START
- Q 0
- ;
- RES(BP,SH) ;EP - restart the link passed in, task man only
- S BP=$O(^INTHPC("B",BP,0))
- I 'BP Q 1
- D SHUT
- H 120 ;maw 4/19/2006 increased hang time to 120 from 60
- D START
- Q 0
- ;
- SHUT ;EP - shut down the process
- Q:'$G(SH) ;quits when shutdown flag is not present
- N X
- F X=1:1:100 K ^INRHB("RUN",BP)
- S X=$$SRVRHNG^INHB(BP)
- Q
- ;
- START ;EP - restart the process
- S X=$$A^INHB(BP)
- Q
- ;
- BHLBCK ; cmi/flag/maw - BHL Check a background task ;
- +1 ;;3.01;BHL IHS Interfaces with GIS;**2,11,14**;OCT 15, 2002
- +2 ;
- +3 ;
- +4 ;this routine will check to see if the task is active and shutdown and
- +5 ;restart on the fly if not.
- +6 ;
- CHK(BP,SH) ;EP - check the task status
- +1 SET BP=$ORDER(^INTHPC("B",BP,0))
- +2 IF 'BP
- QUIT 1
- +3 IF $$VER^INHB(BP)
- QUIT 1
- +4 DO SHUT
- +5 HANG 10
- +6 DO START
- +7 QUIT 0
- +8 ;
- RES(BP,SH) ;EP - restart the link passed in, task man only
- +1 SET BP=$ORDER(^INTHPC("B",BP,0))
- +2 IF 'BP
- QUIT 1
- +3 DO SHUT
- +4 ;maw 4/19/2006 increased hang time to 120 from 60
- HANG 120
- +5 DO START
- +6 QUIT 0
- +7 ;
- SHUT ;EP - shut down the process
- +1 ;quits when shutdown flag is not present
- IF '$GET(SH)
- QUIT
- +2 NEW X
- +3 FOR X=1:1:100
- KILL ^INRHB("RUN",BP)
- +4 SET X=$$SRVRHNG^INHB(BP)
- +5 QUIT
- +6 ;
- START ;EP - restart the process
- +1 SET X=$$A^INHB(BP)
- +2 QUIT
- +3 ;