django-q2 icon indicating copy to clipboard operation
django-q2 copied to clipboard

async_task just exec code inside wrapped function when set Q_CLUSTER sync: True

Open wired87 opened this issue 8 months ago • 5 comments

Hi, Im facing the behaviour that every time I run an function wrapped inside "async_task", its just getting executed /called when i have the config sync: True inside my Q_Cluster settings dict.

What I have done:

  • played a lot with the Q_CLUSTER fields since that issue come on but nothing helped.
  • checked for every task run the db entries -> they are all marked as successfull

I have prepared a basic gist file with the simplified workflow and config: https://gist.github.com/wired87/5e64fc79d3aa84cdad87ef7803f508ce

Also have posted the issue on stack (for future readers case it get an answer there): https://stackoverflow.com/questions/78570366/django-q-in-python-anywhere-ignores-every-functionality-inside-of-it-but-finishe

I was thinked about on wrap the task function also inside a sync_to_async? But in every tutorial i saw that its a common way to pass sync fucntions to aync_task so i havent tried it for now.

I apreciate every reply. Im running out of ideas

wired87 avatar Jun 03 '24 14:06 wired87