mirror of
https://github.com/thsrite/MoviePilot-Plugins.git
synced 2026-06-01 23:16:45 +00:00
fix 修复多个任务立即运行一次
This commit is contained in:
@@ -30,4 +30,5 @@ MoviePilot三方插件市场:https://github.com/thsrite/MoviePilot-Plugins/
|
||||
- [微信消息转发 1.5](docs%2FWeChatForward.md)
|
||||
- 订阅下载统计 1.5
|
||||
- [自定义命令 1.3](docs%2FCustomCommand.md)
|
||||
- docker管理 1.1
|
||||
|
||||
|
||||
@@ -278,11 +278,12 @@
|
||||
"DockerManager": {
|
||||
"name": "docker管理",
|
||||
"description": "管理宿主机docker,自定义容器定时任务。",
|
||||
"version": "1.0",
|
||||
"version": "1.1",
|
||||
"icon": "Docker_F.png",
|
||||
"author": "thsrite",
|
||||
"level": 1,
|
||||
"history": {
|
||||
"v1.1": "修复多个任务立即运行一次",
|
||||
"v1.0": "init"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ class DockerManager(_PluginBase):
|
||||
# 插件图标
|
||||
plugin_icon = "Docker_F.png"
|
||||
# 插件版本
|
||||
plugin_version = "1.0"
|
||||
plugin_version = "1.1"
|
||||
# 插件作者
|
||||
plugin_author = "thsrite"
|
||||
# 作者主页
|
||||
@@ -81,11 +81,6 @@ class DockerManager(_PluginBase):
|
||||
tz=pytz.timezone(settings.TZ)) + timedelta(seconds=3),
|
||||
name=f"{name} {command}",
|
||||
args=[name, command])
|
||||
# 关闭一次性开关
|
||||
self._onlyonce = False
|
||||
|
||||
# 保存配置
|
||||
self.__update_config()
|
||||
else:
|
||||
try:
|
||||
self._scheduler.add_job(func=self.__execute_command,
|
||||
@@ -99,6 +94,11 @@ class DockerManager(_PluginBase):
|
||||
else:
|
||||
logger.error(f"{time_conf} 配置错误,跳过处理")
|
||||
|
||||
if self._onlyonce:
|
||||
# 关闭一次性开关
|
||||
self._onlyonce = False
|
||||
# 保存配置
|
||||
self.__update_config()
|
||||
# 启动任务
|
||||
if self._scheduler.get_jobs():
|
||||
self._scheduler.print_jobs()
|
||||
|
||||
Reference in New Issue
Block a user