Comments (3)
@auvipy - this is still happening on django-celery-beat==2.2.1
- could you please help me with if this would be fixed? or if there's a workaround?
from django-celery-beat.
I was thinking what would be the best way to fix this and im happy to submit a PR if I can find anything
In my speciefic case, the problem is worse because the lunched task will save the Model instance and always prompt a new rescheduling of tasks, so if 2 or 3 are bound to run, and the first one finishes before the scheduler lunches everything, the problem will happen
from django-celery-beat.
Hi there,
I can confirm this is a problem.
The simplest way to reproduce this is to create a task like so
@periodic_task(run_every=datetime.timedelta(minutes=2), options={"expires": 90})
def periodic_test(**kwargs):
print("Running Task")
Then restart both services
celery -A celery_app worker --events -B -S django -l debug
celery -A celery_app events -l debug --camera django_celery_monitor.camera.Camera --frequency=2
Finally go into the periodic tasks in django admin and change a value or disable any other periodic task. As reported in in another issue the schedule doesn't change even though it is committed to the db.
If you then stop and restart the services and it will no longer schedule anything. To rectify the situation I found I can delete all periodic tasks and restart both the celery worker and camera and viola everything is back to normal.
FYI:
celery -A celery_app report
software -> celery:4.0.2 (latentcall) kombu:4.0.2 py:2.7.10
billiard:3.5.0.2 py-amqp:2.1.4
platform -> system:Darwin arch:64bit imp:CPython
loader -> celery.loaders.app.AppLoader
settings -> transport:amqp results:django-db
CELERY_BROKER_PORT: u'5672'
CELERY_RESULT_SERIALIZER: u'json'
CELERY_BROKER_URL: u'amqp://icmadmin:********@localhost:5672/icmanage'
CELERY_TASK_TIME_LIMIT: 28800
CELERY_TASK_TRACK_STARTED: True
CELERY_WORKER_CONCURRENCY: 4
CELERY_BROKER_HOST: u'localhost'
CELERY_BROKER_USER: u'icmadmin'
CELERY_RESULT_BACKEND: u'django-db'
CELERY_TASK_SERIALIZER: u'json'
CELERY_BROKER_PASSWORD: u'********'
CELERY_ACCEPT_CONTENT: [u'json']
CELERY_BEAT_SCHEDULER: u'django_celery_beat.schedulers:DatabaseScheduler'
CELERY_SEND_EVENTS: True
CELERY_SEND_TASK_ERROR_EMAILS: True
from django-celery-beat.
Related Issues (20)
- celery beat_schedule can not automove HOT 1
- schedule task HOT 1
- (Django 5.0.1) AttributeError at /admin/django_celery_beat/crontabschedule/add/ HOT 3
- can I reduce number of beats? HOT 1
- I think there is no longer a need for `self.celery_app.loader.import_default_modules()` in the admin HOT 7
- Received unregistered task of type <app.tasks.function_name> HOT 1
- Rethinking total_run_count reset for one-off tasks in is_due HOT 1
- Add `sphinxcontrib-django` to docs extensions
- Error in logfile HOT 3
- Getting RuntimeWarning with django-celery-beat==2.6.0, django==5.0.3 HOT 7
- Admin: show tasks for each schedule
- Scheduled tasks not running despite showing in beat config HOT 1
- Invalid crontab is created, but breaks database scheduler
- migration returns error HOT 1
- Logging system exception when celery beat can not connect to redis
- Remove Strict Upper Version Limit for Django HOT 12
- How to update PeriodicTask after updating tasks in `app.conf.beat_schedule` HOT 3
- The last_run_at time is always in UTC, which differs from my local configuration time. HOT 2
- Django check fails on migrate HOT 6
- Deactivate periodic tasks in DB used by Beat if not present in Django (e.g. after code change). HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-celery-beat.