faxrunqd problem
Devin Redlich (devin@pctc.com)
Tue, 26 Jan 1999 13:14:59 -0800
Forgive me, my Perl is weak.
I'm using faxrunqd (v. 1.35, run from init) to process my outgoing fax
queue. I have one little problem when it comes to re-queuing faxes.
I've done a little demo of my problem. I send a fax which fails due to a
wrong phone number. I go into the ougoing/F001447 directory, fix the
number in JOB.suspended, and mv JOB.suspended JOB. However, the job never
gets sent. I can queue up a new job, and it'll be processed, but the old
job remains. See below.
This is my faxrunqd -d -v log. It goes from restarting faxrunqd (in debug
mode), to requeuing a fax, and finally queuing and sending a new fax.
Tue Jan 26 12:33:36 1999: faxrunqd starting, pid=29782
RCS: $Id: faxrunqd.in,v 1.35 1998/07/20 22:02:40 gert Exp $
Tue Jan 26 12:33:36 1999: scanning queue directory...
got: F001389
--> new job!
F001389: reading F001389/JOB...
got: F001343
--> new job!
F001343: reading F001343/JOB...
got: F001428
--> new job!
F001428: reading F001428/JOB...
got: F001447
--> new job!
F001447: reading F001447/JOB...
got: F001300
--> new job!
F001300: reading F001300/JOB...
got: F001348
--> new job!
F001348: reading F001348/JOB...
got: F001398
--> new job!
F001398: reading F001398/JOB...
got: F001440
--> new job!
F001440: reading F001440/JOB...
got: F001411
--> new job!
F001411: reading F001411/JOB...
got: F001422
--> new job!
F001422: reading F001422/JOB...
got: F001424
--> new job!
F001424: reading F001424/JOB...
Tue Jan 26 12:33:36 1999: starting modem queues...
Tue Jan 26 12:33:36 1999: queue run finished, childs=0
Tue Jan 26 12:33:36 1999: checking internal queue for delayed jobs...
Pausing 60 seconds...
Tue Jan 26 12:34:36 1999: scanning queue directory...
got: F001389
got: F001343
got: F001428
got: F001447
got: F001300
got: F001348
got: F001398
got: F001440
got: F001411
got: F001422
got: F001424
Tue Jan 26 12:34:36 1999: starting modem queues...
Tue Jan 26 12:34:36 1999: queue run finished, childs=0
Tue Jan 26 12:34:36 1999: checking internal queue for delayed jobs...
Pausing 60 seconds...
Tue Jan 26 12:35:36 1999: scanning queue directory...
got: F001389
got: F001343
got: F001428
got: F001447
got: F001300
got: F001348
got: F001398
got: F001440
got: F001411
got: F001422
got: F001424
Tue Jan 26 12:35:36 1999: starting modem queues...
Tue Jan 26 12:35:36 1999: queue run finished, childs=0
Tue Jan 26 12:35:36 1999: checking internal queue for delayed jobs...
Pausing 60 seconds...
***
It is at this point where I did the mv JOB.suspended JOB
***
Tue Jan 26 12:36:36 1999: scanning queue directory...
got: F001389
got: F001343
got: F001428
got: F001447
got: F001300
got: F001348
got: F001398
got: F001440
got: F001411
got: F001422
got: F001424
Tue Jan 26 12:36:36 1999: starting modem queues...
Tue Jan 26 12:36:36 1999: queue run finished, childs=0
Tue Jan 26 12:36:36 1999: checking internal queue for delayed jobs...
Pausing 60 seconds...
Tue Jan 26 12:37:36 1999: scanning queue directory...
got: F001389
got: F001343
got: F001428
got: F001447
got: F001300
got: F001348
got: F001398
got: F001440
got: F001411
got: F001422
got: F001424
Tue Jan 26 12:37:36 1999: starting modem queues...
Tue Jan 26 12:37:36 1999: queue run finished, childs=0
Tue Jan 26 12:37:36 1999: checking internal queue for delayed jobs...
Pausing 60 seconds...
[deleted 4 more iterations of the above (to save bandwidth)]
At this point, I submit my new fax
Tue Jan 26 12:42:36 1999: scanning queue directory...
got: F001389
got: F001343
got: F001428
got: F001447
got: F001300
got: F002223
--> new job!
F002223: reading F002223/JOB...
F002223: CREATED: Tue Jan 26 12:42:06 1999
F002223: possible ttys: ttyr1A -> queue selected: ttyr1A (l: 0->2)
got: F001348
got: F001398
got: F001440
got: F001411
got: F001422
got: F001424
Tue Jan 26 12:42:36 1999: starting modem queues...
Q: ttyr1A: 1 jobs, queue length 2 (+0), in_use: 0
F002223: Sending F002223/JOB on ttyr1A...
+ phone number: 2055191
+ priority : 5
+ flags : -r
+ pages : f1.g3
F002223: forked off child **29869**...
Waiting for offspring (1 out there)...
---> return=**29869** (-> job=F002223, tty=ttyr1A), status=0 -> exit(0)
F002223: Job successfully sent
sending mail to devin...
delete job directory F002223/.
* queue ttyr1A empty, rescan on-disk-queue
Tue Jan 26 12:43:59 1999: queue run finished, childs=0
Tue Jan 26 12:43:59 1999: checking internal queue for delayed jobs...
Pausing 60 seconds...
Now, I can run faxq and see my job is waiting:
oscar:devin> faxq
F001447/JOB: queued by devin. 1 page(s) to 2055191. pri=6.
If I kill faxrunqd (and init restarts it), the job will be processed right
away.
This is on a SCO OpenServer 5 machine, with Perl 5.0, patchlevel 4
subversion 4. TIA for any suggestions.
__
Devin Redlich
devin@pctc.com