Skip to content

fix: Remove dead Redis PubSub code #229

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

Merged
merged 20 commits into from
Sep 27, 2022
Merged

Conversation

in03
Copy link
Owner

@in03 in03 commented Sep 27, 2022

😬 Accidentally left an old call to publish progress with Redis PubSub.

in03 and others added 20 commits September 6, 2022 03:20
…into feature/issue-224-Revisit-Redis-PubSub
Now just calculating progress and task info every iteration of the loop
instead of checking new data flags. It looks like there may be a race
condition of some sort causing inaccurate worker numbers.

I might consider thread locks if they work with Redis' pubsub run_in_thread.
Alright, this is kind of funny. Turns out I've been reinventing the wheel
this whole time. Celery's GroupResult contains AsyncResult instances with
all the data we need to get active worker count, task completion and
task encoding progress (with a custom task state definition).

So:
- dropped Redis database polling
- dropped Redis PubSub
- use unique worker IDs instead of sequential prefix to easily start
additional workers at any time
@in03 in03 merged commit 36f5cf5 into main Sep 27, 2022
@in03 in03 deleted the feature/issue-224-Revisit-Redis-PubSub branch September 27, 2022 00:08
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

Successfully merging this pull request may close these issues.

1 participant