def rerun_task(job_id, task_id):
"""
Reruns a specific task from a job. Sets the task status to 'pending' and triggers an asynchronous function to
process the task.
Parameters
----------
job_id: str
task_id: int
Returns
-------
None
"""
job = mongo_no_context_get_job(job_id)
task = mongo_no_context_get_task(job_id, task_id)
k = task['k']
covar_type = task['covar_type']
covar_tied = task['covar_tied']
n_init = task['n_init']
s3_file_key = job['s3_file_key']
columns = job['columns']
scale = job.get('scale', False)
response = mongo_no_context_update_task_status(job_id, task_id, 'pending')
work_task.delay(job_id, task_id, k, covar_type, covar_tied, n_init, s3_file_key, columns, scale)
评论列表
文章目录