Skip to content

[Bug]当手动上传来更新插件时不会事先调用terminate #4188

@megumiss

Description

@megumiss

What happened / 发生了什么

上传文件来更新一个已经安装的插件时,不会先调用插件的terminate再安装

Reproduce / 如何复现?

  1. 安装某个写有terminate方法的插件
  2. 手动上传该插件压缩包来更新
  3. terminate方法不会调用

AstrBot version, deployment method (e.g., Windows Docker Desktop deployment), provider used, and messaging platform used. / AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器

AstrBot 版本v4.10.2
Docker 部署

OS

Linux

Logs / 报错日志

手动上传更新插件

[00:51:02] [Core] [INFO] [routes.plugin:421]: 正在安装用户上传的插件 astrbot_plugin_rss-master.zip 
[00:51:02] [Core] [INFO] [star.updator:58]: 正在解压压缩包: data/temp/astrbot_plugin_rss-master.zip 
[00:51:02] [Core] [INFO] [star.updator:73]: 删除临时文件: data/temp/astrbot_plugin_rss-master.zip 和 /AstrBot/data/plugins/astrbot_plugin_rss/astrbot_plugin_rss-master/ 
[00:51:02] [Core] [WARN] [star.star_manager:955]: 删除插件压缩包失败: [Errno 2] No such file or directory: 'data/temp/astrbot_plugin_rss-master.zip' 
[00:51:02] [Core] [INFO] [star.star_manager:396]: 正在载入插件 astrbot_plugin_rss ... 
[00:51:02] [Core] [INFO] [star.star_manager:453]: Plugin astrbot_plugin_rss (v1.0.8) by megumiss: 支持通过 RSSHub 路由和直接 URL 订阅 RSS 源,并定时获取最新的 RSS 内容。 
[00:51:02] [Plug] [INFO] [astrbot_plugin_rss.main:545]: [RSS] 注册图片清理任务: Cron[*/30 * * * *] 保留时长[60分钟] 
[00:51:02] [Plug] [INFO] [astrbot_plugin_rss.main:495]: 刷新定时任务 
[00:51:02] [Plug] [INFO] [astrbot_plugin_rss.main:537]: 定时任务刷新完成,当前运行任务数: 17 
[00:51:02] [Core] [INFO] [routes.plugin:426]: 安装插件 astrbot_plugin_rss-master.zip 成功 

重载插件

[00:55:17] [Core] [INFO] [star.star_manager:901]: 正在终止插件 astrbot_plugin_rss ... 
[00:55:17] [Plug] [INFO] [astrbot_plugin_rss.main:80]: RSS插件正在卸载,准备停止调度器... 
[00:55:17] [Plug] [INFO] [astrbot_plugin_rss.main:84]: RSS插件调度器已停止。 
[00:55:17] [Core] [INFO] [star.star_manager:813]: 移除了插件 astrbot_plugin_rss 的处理函数 rss (171) 
[00:55:17] [Core] [INFO] [star.star_manager:813]: 移除了插件 astrbot_plugin_rss 的处理函数 rsshub (170) 
[00:55:17] [Core] [INFO] [star.star_manager:813]: 移除了插件 astrbot_plugin_rss 的处理函数 rsshub_add (169) 
[00:55:17] [Core] [INFO] [star.star_manager:813]: 移除了插件 astrbot_plugin_rss 的处理函数 rsshub_list (168) 
[00:55:17] [Core] [INFO] [star.star_manager:813]: 移除了插件 astrbot_plugin_rss 的处理函数 rsshub_remove (167) 
[00:55:17] [Core] [INFO] [star.star_manager:813]: 移除了插件 astrbot_plugin_rss 的处理函数 add_command (166) 
[00:55:17] [Core] [INFO] [star.star_manager:813]: 移除了插件 astrbot_plugin_rss 的处理函数 add_url_command (165) 
[00:55:17] [Core] [INFO] [star.star_manager:813]: 移除了插件 astrbot_plugin_rss 的处理函数 list_command (164) 
[00:55:17] [Core] [INFO] [star.star_manager:813]: 移除了插件 astrbot_plugin_rss 的处理函数 remove_command (163) 
[00:55:17] [Core] [INFO] [star.star_manager:813]: 移除了插件 astrbot_plugin_rss 的处理函数 get_command (162) 
[00:55:17] [Core] [INFO] [star.star_manager:396]: 正在载入插件 astrbot_plugin_rss ... 

Are you willing to submit a PR? / 你愿意提交 PR 吗?

  • Yes!

Code of Conduct

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions