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

Usual way of defining periodic tasks in celery not working as expected #270

Open
mrn-aglic opened this issue Feb 2, 2024 · 0 comments
Open

Comments

@mrn-aglic
Copy link

From the docs, it should be possible to define a periodic task like this:

app.conf.beat_schedule = {
    'add-every-30-seconds': {
        'task': 'tasks.add',
        'schedule': 30.0,
        'args': (16, 16)
    },
}

However, when I do it like that in my setup:

      app.conf.beat_schedule = {
          "example": {
              "task": print_task.pipeline.s().name,
              "schedule": 4
          }
      }

the task is executed twice, after which it disappears from the readbeat Redis location.
Also, adding tasks with the built in add_periodic_task makes them appear for a moment, but they disappear from Redis before being executed even once.

The entire repo is here: https://github.com/mrn-aglic/celery-reset-schedule

The schedules are setup in: reset_schedule > beat > __init__.py

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

1 participant