1
0
mirror of https://github.com/0O0o0oOoO00/Alas.git synced 2026-05-14 12:19:24 +08:00

add: clear task when no task

This commit is contained in:
0O0o0oOoO00
2025-08-07 18:50:14 +08:00
parent 10a62a79b5
commit cd7d75624b
2 changed files with 7 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ from datetime import datetime, timedelta
import inflection
from cached_property import cached_property
import scheduler_watcher
from module.base.decorator import del_cached_property
from module.config.config import AzurLaneConfig, TaskEnd
from module.config.deep import deep_get, deep_set
@@ -718,6 +719,7 @@ class AzurLaneAutoScript:
release_resources(next_task=task.command)
if task.next_run > datetime.now():
scheduler_watcher.no_task()
logger.info(f'Wait until {task.next_run} for task `{task.command}`')
self.is_first_task = False
method = self.config.Optimization_WhenTaskQueueEmpty

View File

@@ -107,3 +107,8 @@ class SchedulerWatcher:
def request_extend_task_deadline():
ins = SchedulerWatcher.get_instance()
ins.request_extend_task_deadline()
def no_task():
ins = SchedulerWatcher.get_instance()
ins.no_task()