-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Let tasks change visibility timeout #62
base: master
Are you sure you want to change the base?
Conversation
…handling. When a task fails, immediately make it available again instead of waiting for visibility timeout. Fixes spulec#47
pyqs/__init__.py
Outdated
@@ -1,4 +1,4 @@ | |||
from .decorator import task # noqa | |||
|
|||
__title__ = 'pyqs' | |||
__version__ = '0.1.2' | |||
__version__ = '0.1.4' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to bump this, we will do so when it is released.
Hey jhorman, Thanks for submitting this! Will give it a more thorough review shortly. Couple questions in the meantime:
|
I suppose, since this code is single threaded that yeah, we could set something like function_name.context. That is how celery used to work, but now celery seems to pass in http://docs.celeryproject.org/en/latest/userguide/tasks.html#example. They only pass I guess to match celery we could do the same. I didn't want to rely on config since the whole idea of this is that I have tasks with unknown completion time. I want to be able to renew my lease on the task dynamically/periodically. I think the idea of context can be expanded as well. Allowing access to the message id, other sqs functions, timing information, there could even be task counts, etc, retry control. |
… detect if the message is being sent again, b/c the message had a visibility time out on a different worker.
Allow tasks to change the visibility timeout of the message they are handling.
When a task fails, immediately make it available again instead of waiting for visibility timeout.
Fixes #47