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

Method n_executions

tasktiger/task.py:590–602  ·  view source on GitHub ↗

Queries and returns the number of past task executions.

(self)

Source from the content-addressed store, hash-verified

588 return getattr(func, "_task_queue", tiger.config["DEFAULT_QUEUE"])
589
590 def n_executions(self) -> int:
591 """
592 Queries and returns the number of past task executions.
593 """
594 pipeline = self.tiger.connection.pipeline()
595 pipeline.exists(self.tiger._key("task", self.id))
596 pipeline.get(self.tiger._key("task", self.id, "executions_count"))
597
598 exists, executions_count = pipeline.execute()
599 if not exists:
600 raise TaskNotFound("Task {} not found.".format(self.id))
601
602 return int(executions_count or 0)
603
604 def retry(self) -> None:
605 """

Callers 6

test_retryMethod · 0.80
_runMethod · 0.80

Calls 3

TaskNotFoundClass · 0.85
_keyMethod · 0.80
executeMethod · 0.45

Tested by 5

test_retryMethod · 0.64
_runMethod · 0.64