We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0bd625d commit 692473cCopy full SHA for 692473c
celery_progress/websockets/consumers.py
@@ -27,12 +27,12 @@ async def receive(self, text_data):
27
task_type = text_data_json['type']
28
29
if task_type == 'check_task_completion':
30
- from asgiref.sync import sync_to_async
+ from channels.db import database_sync_to_async
31
await self.channel_layer.group_send(
32
self.task_id,
33
{
34
'type': 'update_task_progress',
35
- 'data': await sync_to_async(Progress(AsyncResult(self.task_id)).get_info, thread_sensitive=True)()
+ 'data': await database_sync_to_async(Progress(AsyncResult(self.task_id)).get_info)()
36
}
37
)
38
0 commit comments