While testing the concurrency I found out that even I stop siege tests queue is still full and processing all stored requests.
Steps to reproduce:
- using browser/curl/siege fill the job with long waiting tasks till you get "queue is full error"
- stop those requests (close siege/browser)
- try to send one more request to the queue
Expected result:
Queue gets drained, all waiting/running jobs gets terminated as open sockets became closed
Current behaviour:
The queue is still processing jobs even connection is closed. Adding new jobs fails with an error before all queued items gets rendered.
We should cancel running jobs if user closes the connection,