* to be sent
*/
job.remove();
- setReadyToRun(job, *req, false);
+ setReadyToRun(job, *req);
delete req;
} else
{
} 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;
* 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) {
/*
// 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);
}
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);
setDead(job);
return;
}
- setReadyToRun(job, *req, jobCtrlWait);
+ setReadyToRun(job, *req);
updateRequest(*req, job);
delete req;
}
};
faxQueueApp::booltag faxQueueApp::booleans[] = {
-{ "jobcontrolwait", &faxQueueApp::jobCtrlWait, true },
};
void
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[];
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);
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
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.