question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ALWAYS_EAGER setting broken

See original GitHub issue

This is on the latest PyPI version.

Setting CELERY_ALWAYS_EAGER = True or TEST_RUNNER = 'djcelery.contrib.test_runner.CeleryTestSuiteRunner' in my Django settings file doesn’t prevent Celery from sending jobs to the queue.

Issue Analytics

  • State:closed
  • Created 11 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
micolouscommented, Jun 4, 2013

@ask It is not that the setting isn’t read from the file – it is whether it is actually obeyed.

I suspect this is related to celery/celery#581.

I think that librabbitmq attempts to run tasks locally without using an AMQP server if none is available, and amqp does simply fails if an AMQP server isn’t available.

0reactions
muehlburgercommented, Jun 11, 2013

I have the same issue with django-celery==3.0.17 and Python 3.3.1. Setting CELERY_ALWAYS_EAGER = True explicitly in settings.py works for me. Using TEST_RUNNER = 'djcelery.contrib.test_runner.CeleryTestSuiteRunner' seems not to set ALWAYS_EAGER to True.

When writing unit tests you are required to set CELERY_ALWAYS_EAGER = True otherwise you cannot check for the calculated return values from my workers using MyTask.delay(). I would prefer using a custom TEST_RUNNER than setting the option explicitly.

Currently my solution is to do the following in settings.py

if 'test' in sys.argv:
    CELERY_ALWAYS_EAGER = True
Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuration and defaults — Celery 3.1.25 documentation
Broker settings. BROKER_URL = 'amqp://guest:guest@localhost:5672//' # List of modules to import when celery starts. CELERY_IMPORTS = ('myapp.tasks' ...
Read more >
how celery_always_eager=True works? - Stack Overflow
It means Celery will not schedule tasks to run as it would regularly do, via sending a message to the broker. Instead, it...
Read more >
celery.execute.send_task should respect ... - GitHub
Trying to figure out why CELERY_ALWAYS_EAGER doesn't work I found that celery.app.base.BaseApp.send_task (and thus celery.execute.send_task) doesn't respect ...
Read more >
God of War Ragnarok: Where to Find Lunda's Broken Cuirass
A guide for how players can find Lunda's Broken Cuirass. ... Beyond story, Favors often give players access to a unique set of...
Read more >
Broken Pieces - GOG SUPPORT CENTER
General troubleshooting · 1) Select the game in "Owned games", click the customization button in the top bar →Manage installation →Configure →Language. ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found