]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Remove JobControlWait
authorAidan Van Dyk <aidan@ifax.com>
Mon, 23 Jul 2007 21:04:09 +0000 (21:04 +0000)
committerAidan Van Dyk <aidan@ifax.com>
Mon, 23 Jul 2007 21:04:09 +0000 (21:04 +0000)
JobControlWait isn't needed with the new scheduler, and it turns out it is
broken as well - it caused faxq to wait for a lock on the qfile, which is
already locked in the patch which waits...

faxd/faxQueueApp.c++
faxd/faxQueueApp.h
man/hylafax-config.4f

index 8c9acaa1fe8fe27afc2571a17bf4eae499ea7796..a27256de4e9158031c8f8be94dbce4cd6d496c84 100644 (file)
@@ -1514,7 +1514,7 @@ faxQueueApp::sendDone(Batch& batch, int status)
             * to be sent
             */
            job.remove();
-           setReadyToRun(job, *req, false);
+           setReadyToRun(job, *req);
            delete req;
        } else
        {
@@ -1710,7 +1710,7 @@ faxQueueApp::sendJobDone(Job& job, FaxRequest* req)
            } else {
                traceQueue(job, "SEND INCOMPLETE: retry immediately; %s",
                    req->result.string());
-               setReadyToRun(job, *req, jobCtrlWait);          // NB: job.tts will be <= now
+               setReadyToRun(job, *req);               // NB: job.tts will be <= now
            }
        } else                                  // signal waiting co-thread
            job.suspendPending = false;
@@ -1741,7 +1741,7 @@ faxQueueApp::sendJobDone(Job& job, FaxRequest* req)
  * JobControl is done running
  */
 void
-faxQueueApp::setReadyToRun(Job& job, FaxRequest& req, bool wait)
+faxQueueApp::setReadyToRun(Job& job, FaxRequest& req)
 {
     if (job.state == FaxRequest::state_blocked) {
        /*
@@ -1792,13 +1792,6 @@ faxQueueApp::setReadyToRun(Job& job, FaxRequest& req, bool wait)
            // Need jobCtrlDone to be called to proceed this job
            ctrlJobDone(job, -1);
        }
-       if (wait)
-       {
-           logInfo("WAITING FOR JobControl to finish");
-           while (job.pid != 0)
-               Dispatcher::instance().dispatch();
-           logInfo("JobControl finished");
-       }
     } else
        setReady(job, req);
 }
@@ -2086,7 +2079,7 @@ faxQueueApp::submitJob(Job& job, FaxRequest& req, bool checkState)
        setSleep(job, job.tts);
     } else {                                   // ready to go now
        job.startKillTimer(req.killtime);
-       setReadyToRun(job, req, false);         // We never wait on submit
+       setReadyToRun(job, req);
     }
     updateRequest(req, job);
     return (true);
@@ -2460,7 +2453,7 @@ faxQueueApp::runJob(Job& job)
        setDead(job);
        return;
     }
-    setReadyToRun(job, *req, jobCtrlWait);
+    setReadyToRun(job, *req);
     updateRequest(*req, job);
     delete req;
 }
@@ -3268,7 +3261,6 @@ faxQueueApp::numbertag faxQueueApp::numbers[] = {
 };
 
 faxQueueApp::booltag faxQueueApp::booleans[] = {
-{ "jobcontrolwait",    &faxQueueApp::jobCtrlWait,      true },
 };
 
 void
index e0b90b927298a43389c43f1046111f894cca7bc9..ea8fd2ccb433653d79ef7b8854e5082e93747a72 100644 (file)
@@ -124,7 +124,6 @@ private:
     fxStr      sendUUCPCmd;            // external command for UUCP calls
     fxStr      wedgedCmd;              // external command for wedged modems
     fxStr      jobCtrlCmd;             // external command for JobControl
-    bool       jobCtrlWait;            // Wait syncronously for JobControl to finish
 
     static stringtag strings[];
     static numbertag numbers[];
@@ -225,7 +224,7 @@ private:
     void       sendStart(Batch&);
     void       sendDone(Batch&, int status);
 
-    void       setReadyToRun(Job& job, FaxRequest& req, bool wait);
+    void       setReadyToRun(Job& job, FaxRequest& req);
     void       setReady(Job& job, FaxRequest& req);
     void       setSleep(Job& job, time_t tts);
     void       setDead(Job& job);
index 2f0cca741b7173e860a8b8f22d30260807172559..0766df276a4dbbc75e081f950d9607c8cb519187 100644 (file)
@@ -147,7 +147,6 @@ GettyArgs   string  \-      arguments passed to getty program
 Include\(S2    string  \-      include another file 
 InternationalPrefix\(S2        string  \-      dialing prefix for international calls
 JobControlCmd\(S1      string  \-      job control command
-JobControlWait\(S1     boolean \s-1Yes\s+1     Wait for JobControlCmd to run synchronously
 JobReqBusy     integer \s-1180\s+1     requeue interval for \s-1BUSY\s+1 dial result
 JobReqDataConn integer \s-1300\s+1     requeue interval for data connection dial result
 JobReqNoAnswer integer \s-1300\s+1     requeue interval for \s-1NO ANSWER\s+1 dial result
@@ -921,18 +920,6 @@ The command to invoke to which provides Job Control information for a
 job. See
 .IR JobControl (${MANNUM1_8}).
 .TP
-.B JobControlWait\(S1
-Make faxq wait synchronously on invocation for JobControlCmd to finish
-before continuing on.  This makes JobControl behaviour the same as the
-previous DestControls, in that pulling jobs out of sleeping and blocked
-state will wait for JobControl to finish before proceeding, so they
-can be added to the batch immediately.  This does mean that if your
-JobControlCmd takes a long time, faxq could be spending time waiting
-for it to exit, instead of proceeding on with other tasks, waiting for
-JobControl to exit asynchronously.  If you aren't concerned about a batch
-missing a potential job because JobControl hasn't completed, and want
-maximum faxq performance, this should be disabled.
-.TP
 .B JobReqBusy
 The delay in seconds to wait before retrying a job whose
 dialing attempt failed with a ``\s-1BUSY\s+1'' status result.