Skip to content
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

Feature: Celery Retry #154

Closed
willseward opened this issue Jul 24, 2016 · 4 comments
Closed

Feature: Celery Retry #154

willseward opened this issue Jul 24, 2016 · 4 comments

Comments

@willseward
Copy link

Is the anyway you could add a .RetryAfter(callable) to the celery node?

At the moment I'm confuse about how the celery task goes from the Error state to the Retry state. It doesn't look like there any automatic process to handle that. Please correct me if I'm wrong.

@kmmbvnr
Copy link
Contributor

kmmbvnr commented Jul 25, 2016

The retry is the action of the JobActivation Generally different UI solutions could be implemented to call it.

To make it consistent with other flow actions, same sort of code like CancelViewMixin need to be added

@willseward
Copy link
Author

Ok. I see how you can implement it with the UI now. Thanks!

What do you think about checking for a retry flag around here: https://github.com/viewflow/viewflow/blob/master/viewflow/decorators.py#L92 ? I was thinking that if a retry value has been set via .RetryAfter(), the task would automatically reschedule itself upon error.

@kmmbvnr
Copy link
Contributor

kmmbvnr commented Jul 25, 2016

I don't think that it should be in viewflow. Celery have own way to retry the task - http://docs.celeryproject.org/en/latest/userguide/tasks.html#retrying

@willseward
Copy link
Author

Agreed, but viewflow throws an error saying that there is transition from Error to Done when it is retried via celery. It would be an easy fix to change the task status to Retry in the celery task, but you suggest avoiding modifying the state in the task itself because nothing is locked.

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

No branches or pull requests

2 participants