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 a762315 commit f4d6e97Copy full SHA for f4d6e97
celery_progress/websockets/consumers.py
@@ -27,11 +27,13 @@ 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
31
+ progress = Progress(AsyncResult(self.task_id))
32
await self.channel_layer.group_send(
33
self.task_id,
34
{
35
'type': 'update_task_progress',
- 'data': Progress(AsyncResult(self.task_id)).get_info()
36
+ 'data': await sync_to_async(progress.get_info, thread_sensitive=True)()
37
}
38
)
39
0 commit comments