Commit Graph

12 Commits

Author SHA1 Message Date
Rumio
be86e0bb7f
♻️ refactor(scheduler): 重构定时任务系统并增强功能 (#2009)
Some checks are pending
检查bot是否运行正常 / bot check (push) Waiting to run
CodeQL Code Security Analysis / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Waiting to run
CodeQL Code Security Analysis / Analyze (${{ matrix.language }}) (none, python) (push) Waiting to run
Sequential Lint and Type Check / ruff-call (push) Waiting to run
Sequential Lint and Type Check / pyright-call (push) Blocked by required conditions
Release Drafter / Update Release Draft (push) Waiting to run
Force Sync to Aliyun / sync (push) Waiting to run
Update Version / update-version (push) Waiting to run
* ♻️ refactor(scheduler): 重构定时任务系统并增强功能

- 【模型重命名】将 `ScheduleInfo` 模型及其数据库表重命名为 `ScheduledJob`,以提高语义清晰度。
- 【触发器抽象】引入 `Trigger` 工厂类,提供类型安全的 Cron、Interval 和 Date 触发器配置。
- 【执行策略】新增 `ExecutionPolicy` 模型,允许为定时任务定义重试策略、延迟、异常类型以及成功/失败回调。
- 【任务执行】重构任务执行逻辑,支持 NoneBot 的依赖注入,并根据 `ExecutionPolicy` 处理任务的重试和回调。
- 【临时任务】增加声明式和编程式的临时任务调度能力,支持非持久化任务在运行时动态创建和执行。
- 【管理命令】更新定时任务管理命令 (`schedule_admin`),使其适配新的 `ScheduledJob` 模型和参数验证逻辑。
- 【展示优化】改进定时任务列表和状态展示,使用新的触发器格式化逻辑和参数模型信息。
- 【重试装饰器】为 `Retry.api` 装饰器添加 `on_success` 回调,允许在任务成功执行后触发额外操作。

* 🚨 auto fix by pre-commit hooks

---------

Co-authored-by: webjoin111 <455457521@qq.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-08-06 09:02:23 +08:00
Rumio
1c5f66beee
feat(http_utils): 重构网络请求工具链,增强稳定性与易用性 (#1951)
*  feat(http_utils): 重构网络请求工具链,增强稳定性与易用性

🔧 HTTP工具优化:
  • 全局httpx.AsyncClient管理,提升连接复用效率
  • AsyncHttpx类重构,支持临时客户端和配置覆盖
  • 新增JSON请求方法(get_json/post_json),内置重试机制
  • 兼容httpx>=0.28.0版本

🔄 重试机制升级:
  • Retry装饰器重构,提供simple/api/download预设
  • 支持指数退避、条件重试和自定义失败处理
  • 扩展异常覆盖范围,提升网络容错能力

🏗️ 架构改进:
  • 新增AllURIsFailedError统一异常处理
  • 浏览器工具模块化,提升代码组织性

* 🚨 auto fix by pre-commit hooks

* 🎨 代码格式化

* 🐛 测试修复

---------

Co-authored-by: webjoin111 <455457521@qq.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: HibiKier <45528451+HibiKier@users.noreply.github.com>
Co-authored-by: HibiKier <775757368@qq.com>
2025-07-03 17:39:13 +08:00
ChthollyWn
a6ddb726d3
新增插件智能模式适配 (#1850)
* 新增插件智能模式适配

* 🚨 auto fix by pre-commit hooks

* 更改类名,命名更清晰

* 🎨 添加模块化参数

* 🎨  AI模块化修改

* 🩹  道具调用修复

* 🩹 修复商品使用前检测

*  retry增加参数适配

*   修改道具使用函数参数传递

*  捕获道具无法使用异常

* 🐛 添加依赖require

* 🐛  修复插件使用问题

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: HibiKier <45528451+HibiKier@users.noreply.github.com>
2025-02-24 09:28:53 +08:00
HibiKier
5fd746a52a
🚑 修复field在pyd1下报错 (#1842)
* 🚑 修复field在pyd1下报错

* 🐛 修正字段
2025-02-04 02:15:21 +08:00
HibiKier
4ed1791b30
🐛 修复添加插件依赖更新 (#1837)
* 🐛 修复添加插件依赖更新

* 🔧 修改插件依赖安装命令为使用poetry运行pip

* 🐛 修复群组入群与退群提示

* 🐛 修复群组踢出用户提醒

* 🎨 代码优化

* 🎨 群欢迎迁移优化

* 🩹 精确webui调用统计

* 🚨 auto fix by pre-commit hooks

* 🐛 修复测试

* 🎨 fix pre-commit.ci

* 🎨  fix pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-02-03 21:23:14 +08:00
BalconyJH
d6fd5f170a
🚨 Make pyright happy (#1840) 2025-01-27 03:40:50 +08:00
HibiKier
2a5c06702a
新增全新商店界面 (#1816)
* 🎉 新增商店模板及样式配置

* 🎨 移除webui注释

* 🎨 新增神秘药水道具及商店样式调整

* 🎨 添加商店样式底部边距调整

---------

Co-authored-by: Flern <cb56ec362bbbfb5272eb941281299d8d-qq_connect@git.osc>
2025-01-06 19:21:35 +08:00
BalconyJH
bc5a9c4fcc
Develop: 完全使用 ruff 替代 isort 与 black (#1757)
* 🚨 完全使用 ruff 替代 isort 与 black

* 🚨 ruff lint&format
2024-12-10 19:49:11 +08:00
HibiKier
625f17a708 🎨 修复bug,移除plugins文件夹 2024-08-29 22:01:34 +08:00
HibiKier
5a50a2bff4 perf👌: 道具使用与签到 2024-03-05 08:29:46 +08:00
HibiKier
db96f46dcb feat: 数据迁移 2024-03-04 23:27:05 +08:00
HibiKier
eb0572ea77 feat: 更新内置插件 2024-02-25 03:18:34 +08:00