MCPcopy Create free account
hub / github.com/aaPanel/BaoTa / init_tasks

Method init_tasks

task.py:2915–2921  ·  view source on GitHub ↗

添加任务到队列

(self)

Source from the content-addressed store, hash-verified

2913 self._tasks.append(script)
2914
2915 def init_tasks(self):
2916 """添加任务到队列"""
2917 with self.lock:
2918 for idx, task in enumerate(self._tasks):
2919 next_execution_time = task.first() + idx*3
2920 heapq.heappush(self.heap, (next_execution_time, task.get_ident(), task))
2921 self._tasks = None
2922
2923 def repetition_check(self, task: _Script) -> bool:
2924 real_cmd = task.cmd.strip()

Callers 1

startMethod · 0.95

Calls 2

get_identMethod · 0.80
firstMethod · 0.45

Tested by

no test coverage detected