MCPcopy
hub / github.com/celery/celery / update_state

Method update_state

celery/app/task.py:1041–1053  ·  view source on GitHub ↗

Update task state. Arguments: task_id (str): Id of the task to update. Defaults to the id of the current task. state (str): New state. meta (Dict): State meta-data.

(self, task_id=None, state=None, meta=None, **kwargs)

Source from the content-addressed store, hash-verified

1039 return sig.delay() if not lazy else sig
1040
1041 def update_state(self, task_id=None, state=None, meta=None, **kwargs):
1042 """Update task state.
1043
1044 Arguments:
1045 task_id (str): Id of the task to update.
1046 Defaults to the id of the current task.
1047 state (str): New state.
1048 meta (Dict): State meta-data.
1049 """
1050 if task_id is None:
1051 task_id = self.request.id
1052 self.backend.store_result(
1053 task_id, meta, state, request=self.request, **kwargs)
1054
1055 def before_start(self, task_id, args, kwargs):
1056 """Handler called before the task starts.

Callers 3

test_update_stateMethod · 0.45
on_messageMethod · 0.45

Calls 1

store_resultMethod · 0.45