diff --git a/breathecode/commons/tasks.py b/breathecode/commons/tasks.py index 0452371af..5bed527fc 100644 --- a/breathecode/commons/tasks.py +++ b/breathecode/commons/tasks.py @@ -122,10 +122,12 @@ def mark_task_as_pending(task_manager_id, *, attempts=0, force=False, last_run=N module = importlib.import_module(x.task_module) function = getattr(module, x.task_name) - function.delay(*x.arguments['args'], - **x.arguments['kwargs'], - page=x.current_page + 1, - total_pages=x.total_pages, - task_manager_id=task_manager_id) + function.delay( + *x.arguments['args'], **{ + **x.arguments['kwargs'], + 'page': x.current_page + 1, + 'total_pages': x.total_pages, + 'task_manager_id': task_manager_id, + }) logger.info(f'TaskManager {task_manager_id} is PENDING')