Skip to content
This repository was archived by the owner on Aug 3, 2026. It is now read-only.

[SE-4860] cherry-pick configuration/pull/6586 - #185

Closed
gabor-boros wants to merge 1 commit into
opencraft-release/koa.3from
gabor/backport-singlebeat-changes
Closed

[SE-4860] cherry-pick configuration/pull/6586#185
gabor-boros wants to merge 1 commit into
opencraft-release/koa.3from
gabor/backport-singlebeat-changes

Conversation

@gabor-boros

Copy link
Copy Markdown

Description

Cherry-pick of openedx-unsupported#6586

This PR allows setting separate users for single-beat and celery brokers, allows authentication, and setting the single-beat identifier for future fine-grained access control using Redis ACLs.

Also, we are replacing the source url of the package, hence the original code became outdated and akachanov:master is ahead of the original repo by fixing issues and removing incompatible code.

Supporting information

Some months ago edX platform was not capable of doing periodic scheduling of celery tasks. Therefore we added celerybeat to the platform. The only issue with celerybeat is that it cannot run more than once. If multiple celerybeat schedulers are running at the same time, the same task can be scheduled multiple times resulting in unwanted behaviours. Here comes single-beat into picture that ensures (using redis) that no more than one celerybeat processes are running.

Can you explain what it is in akachanov's fork that's critical to us here?

Akachanov removed Tornadis that was published in 2018 for the last time and broke with the newest Celery. Using Akachanov's fork ensures that single-beat is still working with the newest Celery and he also seems to fixed some reconnect issues -- I assume hence the celerybeat process restarts, since I cannot see any errors and periodically scheduled tasks are processed as expected.

Other squashed commit messages:

fix: celery 5.0+ does not support --app as a worker flag
refactor: remove duplicated app declaration
fix: --config flag is global since Celery 5.0+
fix: replace single-beat with an updated version
fix: add missing comma
fix: replace maxtasksperchild worker flag
refactor: address PR review comments
refactor: remove celery<5 adjustments
fix: set single-beat autorestart

Signed-off-by: Gabor Boros <gabor.brs@gmail.com>
@gabor-boros
gabor-boros deleted the gabor/backport-singlebeat-changes branch March 14, 2022 06:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant