'Update the current celery task\'s state to the progress state
specified by the current object.  Returns the progress
dictionary for use by `run_main_task` and
`BaseInstructorTask.on_success`.
Arguments:
extra_meta (dict): Extra metadata to pass to `update_state`
Returns:
dict: The current task\'s progress dict'

def update_task_state(self, extra_meta=None):

    progress_dict = {'action_name': self.action_name, 'attempted': self.attempted, 'succeeded': self.succeeded, 'skipped': self.skipped, 'failed': self.failed, 'total': self.total, 'preassigned': self.preassigned, 'duration_ms': int(((time() - self.start_time) * 1000))}
    if (extra_meta is not None):
        progress_dict.update(extra_meta)
    _get_current_task().update_state(state=PROGRESS, meta=progress_dict)
    return progress_dict
