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

Recheck that dup task is actually running #17

Open
Suor opened this issue Apr 17, 2020 · 6 comments
Open

Recheck that dup task is actually running #17

Suor opened this issue Apr 17, 2020 · 6 comments

Comments

@Suor
Copy link
Contributor

Suor commented Apr 17, 2020

This might be done with AsyncResult(existing_task_id).ready().

@steinitzu
Copy link
Owner

This is probably a bug if it doesn't work Should be no difference between AsyncResult here and with normal celery.

What's the result of this now and is it different from a standard celery task?

@Suor
Copy link
Contributor Author

Suor commented Apr 17, 2020

Now, there is no recheck. I thought that might help if worker crashed.

@steinitzu
Copy link
Owner

Ah I see what you mean, to check for zombie locks?

This still returns "pending" for unknown task IDs, right? So we still don't know whether it's queued or not.

@Suor
Copy link
Contributor Author

Suor commented Apr 18, 2020

Hmm, maybe I'm not familiar enough with this part of celery. So the is no way to fix this only expiry thing?

@steinitzu
Copy link
Owner

There's not really a reliable way to do this that I know.

You can use celery signals to set a custom state instead of "pending" when the task is actually sent to the broker, and say if task is "pending" it doesn't exist.

But that doesn't guarantee much as you would still get "pending if the check happens sometime in between sending the first task and updating the state.

@Suor
Copy link
Contributor Author

Suor commented Apr 18, 2020

If you can't really do that then this might be closed.

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

No branches or pull requests

2 participants