run syc or async

This commit is contained in:
Анатолий Богомолов 2024-04-12 21:43:08 +10:00
parent 111a81ae26
commit 28242afac8
1 changed files with 4 additions and 1 deletions

View File

@ -100,7 +100,10 @@ def start_task(task_id: int):
add_to_group_task.delay(task_id=task_id) add_to_group_task.delay(task_id=task_id)
case 'parse': case 'parse':
if task.file:
parse_users_task.delay(task_id=task_id) parse_users_task.delay(task_id=task_id)
else:
parse_users_task.run(task_id=task_id)
return '', 204 return '', 204