Django Q tasks are not executed with ./manage.py test
See original GitHub issueHello,
My models have some django Q task starting on certain action such as overridden Model.save() . The async tasks work correctly during functional testing, but the tasks are submitted but not executed if I hit the same code with ./manage.py test
.
I just see some message of my 13:07:53 [Q] INFO Enqueued 1
, probably of my tasks being queued, but they’re not executed.
Is this something expected?
Issue Analytics
- State:
- Created 6 years ago
- Comments:6
Top Results From Across the Web
Tasks — Django Q 1.3.6 documentation - Read the Docs
Simulates a task execution synchronously. Useful for testing. Can also be forced globally via the sync configuration option. cached¶. Redirects the result to ......
Read more >Mock async_task of Django-q - unit testing - Stack Overflow
I'm using django-q and I'm currently working on adding tests using mock for my existing tasks. I could easily create tests for each...
Read more >Koed00/django-q - Gitter
I have found that my dev VM can't handle the load. All the focus seems to be on adding items to the queue...
Read more >django-toosimple-q - PyPI
A simplistic task queue and cron-like scheduler for Django. ... long # running tasks don't prevent short running tasks # from being run...
Read more >Job Queues and Workers in Django - Honeybadger.io
Now, when you run you project with python manage.py runserver and open ... Django Q is an application used to manage job/task queues...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That’s what I’ve done at the end 😃 thanks for your help.
@epinna a very easy solution would be to change a setting during you tests.
In your
tests.py
settings filesor at the beginning of your test (if you only have a single test that needs it)
This will remove the need to copy any code