pyramid_celery
pyramid_celery copied to clipboard
Duplicated Tasks
Hi John, Thanks for your hard work on this project, it makes things lot easier. I have realized that all my tasks are running twice, I was wondering if you have faced an issue like this in the past:
2015-05-28 08:43:04,586 INFO [celery.beat][MainThread] beat: Starting...
2015-05-28 08:43:04,586 INFO [celery.beat][MainThread] beat: Starting...
2015-05-28 08:43:04,600 INFO [celery.worker.consumer][MainThread] Connected to redis://127.0.0.1:6379/0
2015-05-28 08:43:04,600 INFO [celery.worker.consumer][MainThread] Connected to redis://127.0.0.1:6379/0
2015-05-28 08:43:04,614 INFO [celery.worker.consumer][MainThread] mingle: searching for neighbors
2015-05-28 08:43:04,614 INFO [celery.worker.consumer][MainThread] mingle: searching for neighbors
2015-05-28 08:43:04,639 INFO [celery.beat][MainThread] Scheduler: Sending due task task1 (app.task.user.add)
2015-05-28 08:43:04,639 INFO [celery.beat][MainThread] Scheduler: Sending due task task1 (app.task.user.add)
2015-05-28 08:43:05,623 INFO [celery.worker.consumer][MainThread] mingle: all alone
2015-05-28 08:43:05,623 INFO [celery.worker.consumer][MainThread] mingle: all alone
2015-05-28 08:43:06,145 INFO [celery.worker.strategy][MainThread] Received task: app.task.user.add[85240b95-a9f4-4a40-b215-36c5379c871a]
2015-05-28 08:43:06,145 INFO [celery.worker.strategy][MainThread] Received task: app.task.user.add[85240b95-a9f4-4a40-b215-36c537
This is the configuration I'm using:
#development.ini
[celery]
BROKER_URL = redis://127.0.0.1:6379/0
CELERY_IMPORTS = app.task.user
[celerybeat:task1]
task = app.task.user.add
type = timedelta
schedule = {"seconds": 15}
Task file:
#app.task.user
from pyramid_celery import celery_app as app
import logging
@app.task
def add(*args, **kwargs):
log = logging.getLogger('celery')
log.error(app.control.inspect())
return None
I have tried to fix it following the celery documentation, but I don't really know how to add BROKER_TRANSPORT_OPTIONS
to the development.ini file. How do you parse the JSON options into the .ini file? Thanks John.