def add_task_progress_update(context, task_id, current_step, total_steps, message): task_progress_update = _get_progress_update(context, task_id, current_step) if not task_progress_update: task_progress_update = models.TaskProgressUpdate() context.session.add(task_progress_update) task_progress_update.task_id = task_id task_progress_update.current_step = current_step task_progress_update.total_steps = total_steps task_progress_update.message = message
def add_task_progress_update(context, task_id, total_steps, message): current_step = get_task_progress_step(context, task_id) + 1 task_progress_update = models.TaskProgressUpdate( task_id=task_id, current_step=current_step, total_steps=total_steps, message=message) _session(context).add(task_progress_update)