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

Duplicated Tasks #51

Open
AnderUstarroz opened this issue May 28, 2015 · 0 comments
Open

Duplicated Tasks #51

AnderUstarroz opened this issue May 28, 2015 · 0 comments

Comments

@AnderUstarroz
Copy link

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.

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