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:
2
alas.py
2
alas.py
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user