Implementing timeout for workers #105

merged 5 commits into from Apr 27, 2012


None yet
4 participants

heynemann commented Apr 27, 2012

We have a worker that ocasionally takes a long time to process and thus locks the worker.

I've seen a ticket asking for implementing timeout for workers. We implemented it and it works as expected. When you start a worker you can specify a timeout in seconds for that given worker.

If we can improve anything that would help this in being accepted, please let us know.

Bernardo Heynemann


binarydud commented Apr 27, 2012

looks good. Thanks for the tests as well.

binarydud added a commit that referenced this pull request Apr 27, 2012

Merge pull request #105 from heynemann/master
Implementing timeout for workers

@binarydud binarydud merged commit 408b68a into binarydud:master Apr 27, 2012

This line seems incorrect to me. It throws TypeError if options.timeout is None. Because if you evaluate it you'll get following: None is None and None or int(None) => None or int(None) => int(None) => TypeError
May be replace it with options.timeout and int(options.timeout)?


heynemann commented on 75760da May 2, 2012

Very sorry for the mistake :(

Hope it does not stop me from contributing to pyres in the future.

Already submitted a pull request for the fix you suggested.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment