MCPcopy Create free account
hub / github.com/closeio/tasktiger / store_task_execution

Method store_task_execution

tasktiger/worker.py:923–937  ·  view source on GitHub ↗
(self, tasks: List[Task], execution: Dict)

Source from the content-addressed store, hash-verified

921 return set(self.connection.sscan_iter(key, match=match, count=100000))
922
923 def store_task_execution(self, tasks: List[Task], execution: Dict) -> None:
924 serialized_execution = json.dumps(execution)
925
926 for task in tasks:
927 executions_key = self._key("task", task.id, "executions")
928 executions_count_key = self._key("task", task.id, "executions_count")
929
930 pipeline = self.connection.pipeline()
931 pipeline.incr(executions_count_key)
932 pipeline.rpush(executions_key, serialized_execution)
933
934 if task.max_stored_executions:
935 pipeline.ltrim(executions_key, -task.max_stored_executions, -1)
936
937 pipeline.execute()
938
939 def run(
940 self,

Callers 2

execute_tasksMethod · 0.80
executeMethod · 0.80

Calls 2

_keyMethod · 0.80
executeMethod · 0.45

Tested by

no test coverage detected