source: FOIAVistA/tag/r/MAILMAN-XM/XMKPL.m@ 949

Last change on this file since 949 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 2.2 KB
Line 
1XMKPL ;ISC-SF/GMB-Manage the local mail posting process ;04/17/2002 10:54
2 ;;8.0;MailMan;;Jun 28, 2002
3 ; Replaces ^XMADGO1,^XMADGO (ISC-WASH/CAP)
4 ; Entry points (not covered by DBIA):
5 ; CHECK Check the local processes.
6 ; If they haven't been deliberately STOP'd,
7 ; and if they are not running,
8 ; then task them.
9 ; STATUS Get status of local processes.
10 ;
11 ; Entry points used by MailMan options (not covered by DBIA):
12 ; STOP XMMGR-STOP-BACKGROUND-FILER - Stop the local processes.
13 ; START XMMGR-START-BACKGROUND-FILER - Start the local processes.
14 ;
15CHECK ; Task Background Filer processes if any missing
16 Q:$P(^XMB(1,1,0),U,16) ; Quit if 'background filer stop flag' set.
17 N XMPROC,XMSTATUS
18 D STATUS(.XMSTATUS)
19 Q:'$D(XMSTATUS)
20 S XMPROC=""
21 F S XMPROC=$O(XMSTATUS(XMPROC)) Q:XMPROC="" D QUEUE(XMPROC)
22 Q
23STATUS(XMSTATUS) ;Check status of background filer
24 N XMPROC,XMLOCK
25 F XMPROC="Mover","Tickler" D
26 . S XMLOCK="POST_"_XMPROC
27 . L +^XMBPOST(XMLOCK):0 E Q
28 . S XMSTATUS(XMPROC)=$$EZBLD^DIALOG($S(XMPROC="Mover":36224.1,1:36224.2)) ; The Mover/Tickler is not running!
29 . L -^XMBPOST(XMLOCK)
30 Q
31QUEUE(XMPROC) ;Start Queue processors
32 N XMHANG,ZTRTN,ZTDESC,ZTSAVE,X,ZTSK,ZTQUEUED,ZTCPU,ZTDTH,ZTIO
33 S XMHANG=$$HANG
34 S ZTDESC=$$EZBLD^DIALOG($S(XMPROC="Mover":36227,1:36228)) ; MailMan: Background Filer (Mover/Tickler)
35 S ZTSAVE("XMHANG")=""
36 S ZTRTN=$S(XMPROC="Mover":"GO^XMKPLQ",1:"GO^XMTDT")
37 I $D(^XMB(1,1,0)) S X=$P(^(0),U,12) I X'="" S ZTCPU=$P(X,",",2)
38 S ZTIO="",ZTDTH=$H
39 D ^%ZTLOAD
40 Q
41HANG() ; Get Hangtime for delivery modules
42 N X
43 S X=$P($G(^XMB(1,1,0)),U,13)
44 Q $S(X:X,1:5)
45STOP ; Stop Background mail delivery processes
46 N DIR,Y,DIRUT
47 S DIR(0)="Y"
48 D BLD^DIALOG(36229,"","","DIR(""A"")")
49 ;Are you sure you want the Background Filers to stop delivering mail
50 S DIR("B")=$$EZBLD^DIALOG(39053) ; No
51 D ^DIR Q:'Y
52 S $P(^XMB(1,1,0),U,16)=1 ; Set 'background filer stop flag'
53 W:'$D(ZTQUEUED) !!,$C(7),$$EZBLD^DIALOG(36229.1) ; << Background Filers will stop soon. >>
54 Q
55START ; Start the local processes (usually after they had been STOP'd).
56 S $P(^XMB(1,1,0),U,16)="" ; Reset 'background filer stop flag'
57 D CHECK
58 W:'$D(ZTQUEUED) !!,$C(7),$$EZBLD^DIALOG(36229.2) ; << Background Filers will start soon. >>
59 Q
Note: See TracBrowser for help on using the repository browser.