[613] | 1 | XMCP ;ISC-SF/GMB-Poll Domains ;08/29/2002 13:12
|
---|
| 2 | ;;8.0;MailMan;**4**;Jun 28, 2002
|
---|
| 3 | ; Was (WASH ISC)/CAP/RM/AML/THM
|
---|
| 4 | ;
|
---|
| 5 | ; Entry points used by MailMan options (not covered by DBIA):
|
---|
| 6 | ; POLL XMPOLL (was POLL^XMS1 and TSKPOLR^XMS5B)
|
---|
| 7 | ;
|
---|
| 8 | ; This option may be SCHEDULED.
|
---|
| 9 | ; It goes through a list of domains whose FLAGS field contains P,
|
---|
| 10 | ; meaning that the domains are to be "polled", that they should be
|
---|
| 11 | ; contacted whether or not there are messages in their queues.
|
---|
| 12 | ; If no messages are in the queues, the script for the poll domain
|
---|
| 13 | ; will be 'played' anyway, and the TURN command executed to pull in
|
---|
| 14 | ; any messages which may be waiting to be transmitted to this domain.
|
---|
| 15 | ;
|
---|
| 16 | POLL ; Process domains on poll list.
|
---|
| 17 | S:$D(ZTQUEUED) ZTREQ="@"
|
---|
| 18 | K ^TMP("XM",$J)
|
---|
| 19 | I $$GOTTASKS W:'$D(ZTQUEUED) !!,$$EZBLD^DIALOG(42150) Q ;All domains have tasks.
|
---|
| 20 | I $$XMITOK D TASKXMIT
|
---|
| 21 | K ^TMP("XM",$J)
|
---|
| 22 | Q
|
---|
| 23 | GOTTASKS() ; Does every poll site have a task?
|
---|
| 24 | N XMTSK,XMINST,XMSITE,XMPARM
|
---|
| 25 | S XMINST=0
|
---|
| 26 | F S XMINST=$O(^DIC(4.2,"AC","P",XMINST)) Q:'XMINST D
|
---|
| 27 | . W:'$D(ZTQUEUED) "."
|
---|
| 28 | . S XMSITE=$P(^DIC(4.2,XMINST,0),U)
|
---|
| 29 | . S XMTSK=$$GETTSK^XMKPR(XMINST)
|
---|
| 30 | . I XMTSK,'$$TSKEXIST^XMKPR(XMINST,XMTSK) S ^TMP("XM",$J,XMSITE)=XMINST Q
|
---|
| 31 | . Q:$D(ZTQUEUED)
|
---|
| 32 | . S XMPARM(1)=XMTSK,XMPARM(2)=XMSITE
|
---|
| 33 | . W !,$$EZBLD^DIALOG(42151,.XMPARM) ;Task |1| is already scheduled for domain |2|
|
---|
| 34 | Q '$D(^TMP("XM",$J))
|
---|
| 35 | XMITOK() ; Ask whether eligible queues should be transmitted.
|
---|
| 36 | N DIR,DIRUT,DTOUT,DUOUT,X,Y,XMSITE
|
---|
| 37 | I $D(ZTQUEUED) Q 1
|
---|
| 38 | W @IOF,$$EZBLD^DIALOG(42152) ;These domains lack tasks:
|
---|
| 39 | S XMSITE=""
|
---|
| 40 | F S XMSITE=$O(^TMP("XM",$J,XMSITE)) Q:XMSITE="" D
|
---|
| 41 | . I $Y+4>IOSL D
|
---|
| 42 | . . D WAIT^XMXUTIL
|
---|
| 43 | . . W @IOF
|
---|
| 44 | . W !?5,XMSITE
|
---|
| 45 | S DIR(0)="YO"
|
---|
| 46 | S DIR("A")=$$EZBLD^DIALOG(42128) ;Requeue the missing tasks
|
---|
| 47 | S DIR("B")=$$EZBLD^DIALOG(39053) ;NO
|
---|
| 48 | S DIR("?")=$$EZBLD^DIALOG(42153) ;Answer YES to transmit these domains.
|
---|
| 49 | D ^DIR
|
---|
| 50 | I 'Y W !!,$$EZBLD^DIALOG(42130) ;Tasks not requeued.
|
---|
| 51 | Q Y
|
---|
| 52 | TASKXMIT ;
|
---|
| 53 | ; Task off transmission jobs
|
---|
| 54 | N XMINST,XMSITE,XMPOLL
|
---|
| 55 | I '$D(ZTQUEUED) W !
|
---|
| 56 | S XMSITE="",XMPOLL=1
|
---|
| 57 | F S XMSITE=$O(^TMP("XM",$J,XMSITE)) Q:XMSITE="" S XMINST=^(XMSITE) D
|
---|
| 58 | . D QUEUE^XMCX(XMINST,XMSITE)
|
---|
| 59 | W:'$D(ZTQUEUED) !,$$EZBLD^DIALOG(42132) ; Finished.
|
---|
| 60 | Q
|
---|