spulec / PyQS

Python task-queues for Amazon SQS
MIT License
173 stars 36 forks source link

Make LONG_POLLING_INTERVAL configurable #60

Open jhorman opened 5 years ago

jhorman commented 5 years ago

I would like to be able to have workers shutdown more quickly. Having this set to 20 when the queue is empty means slow deploys.

spulec commented 5 years ago

Agreed. A PR would be very welcome. Setting this as a feature request.

Tenzer commented 4 years ago

Would it not be more ideal if the polling would be interrupted when a SIGTERM signal is received? That way you would get the benefit of having the optimal long polling (with fewest possible requests) along with quick shutdowns.

I don't know how difficult that would be to achieve though.