MCPcopy Create free account
hub / github.com/celery/celery / update_state

Method update_state

celery/app/task.py:1221–1233  ·  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

1219 return sig.delay() if not lazy else sig
1220
1221 def update_state(self, task_id=None, state=None, meta=None, **kwargs):
1222 """Update task state.
1223
1224 Arguments:
1225 task_id (str): Id of the task to update.
1226 Defaults to the id of the current task.
1227 state (str): New state.
1228 meta (Dict): State meta-data.
1229 """
1230 if task_id is None:
1231 task_id = self.request.id
1232 self.backend.store_result(
1233 task_id, meta, state, request=self.request, **kwargs)
1234
1235 def before_start(self, task_id, args, kwargs):
1236 """Handler called before the task starts.

Callers 3

test_update_stateMethod · 0.45
on_messageMethod · 0.45

Calls 1

store_resultMethod · 0.45