-
-
Notifications
You must be signed in to change notification settings - Fork 294
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
Django Q tasks are not executed with ./manage.py test #266
Comments
Short answer is: Yes it is something expected. By calling There are a few ways you can processed.
|
Hey Eagllus, Thanks for the clarification. How to execute the queued tasks? Is something I should write at code-level within my tests or can I trigger that with some Thanks |
I looked at your testsuite, I think I'll write as the same as you do here: https://github.com/Koed00/django-q/blob/master/django_q/tests/test_cluster.py#L111 Thanks |
I wrote in my tests something like this, which seems working for a single task:
The problem is that I'm submitting a Could you suggest me how to handle chain of tasks manually in order to be executed within TestCases? Thanks for your help |
@epinna a very easy solution would be to change a setting during you tests. In your
or 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 |
That's what I've done at the end :) thanks for your help. |
In case someone hit this... If you see that async tasks are executed in some cases (functional testing like here or running |
P.S. About the same thing I wrote above: #203 |
Hello,
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?
The text was updated successfully, but these errors were encountered: