I am using a LoopingCall to get jobs to a worker every X seconds – but there might be times when the worker doesn’t finish the previous job sooner that X seconds and then I want the LoopingCall to not get any new job. Basically I want a way to let the LoopingCall to wait another round until it pulls the job.
Share
http://twistedmatrix.com/documents/current/api/twisted.internet.task.LoopingCall.html
The function your
LoopingCallcalls may return a deferred. Rescheduling will not occur until that deferred is fired.I’m having trouble understanding your post, but I think this is what you’re after. Have your worker-function return a deferred to the LoopingCall and fire it when the job is complete.