Hi,
if I read the code and docs correctly, there's no way at the moment for a worker/client to wait or poll for new jobs. queue/{queue}/job always returns immediately, either with a pop'ed job or with a No content response (in the latter case optionally appyling a per-queue delay setting).
This means the worker would do this request in a loop with a delay between requests.
What do you think of an (optional) parameter on queue/{queue}/job to instead keep the connection open until a new job arrives? I would guess that from the Redis side this should be possible with BRPOPLPUSH in place of RPOPLPUSH (here).
Hi,
if I read the code and docs correctly, there's no way at the moment for a worker/client to wait or poll for new jobs.
queue/{queue}/jobalways returns immediately, either with a pop'ed job or with aNo contentresponse (in the latter case optionally appyling a per-queue delay setting).This means the worker would do this request in a loop with a delay between requests.
What do you think of an (optional) parameter on
queue/{queue}/jobto instead keep the connection open until a new job arrives? I would guess that from the Redis side this should be possible withBRPOPLPUSHin place ofRPOPLPUSH(here).