Skip to content

Commit

Permalink
Update celery beat entrypoint for celery 5
Browse files Browse the repository at this point in the history
The docs are here https://docs.celeryq.dev/en/stable/reference/celery.apps.beat.html
This was breaking in production as we were using an outdated call to the celery beat binary. Help from this stack overflow comment: https://stackoverflow.com/a/65213590
  • Loading branch information
Matt Daily committed Sep 5, 2024
1 parent fda317b commit ad51ad7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions banzai/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,8 @@ def start_stacking_scheduler():
schedule_calibration_stacking.s(site=site, runtime_context=vars(runtime_context)),
queue=runtime_context.CELERY_TASK_QUEUE_NAME)

beat = celery.bin.beat.beat(app=app)
app.Beat(schedule='/tmp/celerybeat-schedule', pidfile='/tmp/celerybeat.pid', working_directory='/tmp').run()
logger.info('Starting celery beat')
beat.run(schedule='/tmp/celerybeat-schedule', pidfile='/tmp/celerybeat.pid', working_directory='/tmp')


def run_realtime_pipeline():
extra_console_arguments = [{'args': ['--n-processes'],
Expand Down

0 comments on commit ad51ad7

Please sign in to comment.