whyour
a94e665054
fix: 修复任务生命周期与调度就绪,优化执行和构建开销 ( #3069 )
...
* fix: harden task lifecycle and scheduler readiness
* fix: confine log writes to the configured log directory
* fix: verify complete build artifacts and untracked inputs
* fix: reconcile scheduler state and make stop win startup races
* fix: isolate cron generations and serialize scheduler recovery
2026-09-13 00:32:41 +08:00
whyour
dfa73af104
fix: preserve container startup diagnostics
2026-08-18 00:40:40 +08:00
whyour
e92ddb0aed
修复添加任务有可能失败
2026-07-01 00:37:42 +08:00
Martha Ramirez
a942a5686f
修复删除定时任务后 crontab.list 残留导致订阅更新无法重新注册 ( #3021 )
...
* 修复删除定时任务后 crontab.list 未同步导致订阅更新无法重新注册脚本
crontab.list 作为数据库的文件镜像,其同步 setCrontab() 此前串行在尽力而为
的 gRPC addCron/delCron 调用之后:当调度 worker 重启等导致 gRPC 短暂不可用、
addCron/delCron reject 时,setCrontab() 会被跳过,crontab.list 与数据库脱节。
而 shell/update.sh 的 gen_list_repo() 将 crontab.list 作为"已有任务"真源,
于是订阅更新误判脚本已存在、跳过新增注册(前端再也看不到这些脚本)。
将 create/update/remove/disabled/enabled/autosave_crontab 中的 gRPC 调用改为
尽力而为(try/catch + 告警日志),保证 setCrontab() 总是执行;autosave_crontab
额外将 setCrontab 提前到 addCron 之前,确保启动/调度器重启时文件总是同步,
并避免 gRPC 失败导致应用启动崩溃。
调度器内存中的任务注册与 crontab.list/系统 crontab 同步是两个相互独立的关注点:
gRPC 失败时内存调度可能在调度器重启后由 autosave_crontab 重新注册,但文件同步
不应因此被阻断。修复后既有的 crontab.list 残留会在下次重启或任意增删改时自愈。
可能与 #2422(订阅更新重复添加任务)同根因。
* 过滤 delCron 中 scheduleStacks 的 null job
nodeSchedule.scheduleJob() 对无效 cron 表达式(如 "0 * /6 * * *",
空格分开了 * /6)会返回 null,原代码原样存入 scheduleStacks 数组。
delCron 取消时对 null 调 cancel() 抛出 UNKNOWN 错误,导致 gRPC
handler 中断、HTTP 端 cronService.remove() 跳过 setCrontab(),
crontab.list 残留已删任务的记录,导致订阅更新时 gen_list_repo()
误判脚本已存在、不再重新注册。
过滤 null 并对每个 cancel 调用加 try/catch 容错。
2026-06-30 23:48:51 +08:00
whyour
949d956aef
grpc 服务增加证书校验
2026-06-13 20:16:49 +08:00
whyour
2fe9470ff0
fix: gRPC extra_schedules 为空时序列化报错 not iterable
2026-05-31 00:14:22 +08:00
whyour
40d4de9017
增加 localhost 检测
2026-05-17 23:43:09 +08:00
whyour
3464c4da61
fix IPv6 connectivity
2026-05-06 01:29:01 +08:00
58f5fe763f
Add cron task management to QLAPI ( #2826 )
...
* Initial plan
* Add cron management capabilities to QLAPI
- Added GetCrons, GetCronById, EnableCrons, DisableCrons, RunCrons to proto
- Implemented gRPC handlers for new cron operations
- Updated client.js to expose new methods to scripts
- Updated sample to demonstrate new API usage
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com >
* Add documentation for QLAPI cron management features
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com >
* Specify pnpm version 8.3.1 in package.json
Add packageManager field to enforce pnpm@8.3.1 as requested
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com >
* Revert pnpm-lock.yaml to original state
The lockfile was inadvertently updated during dependency installation
for proto generation. Reverting to maintain consistency with pnpm@8.3.1.
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com >
* Regenerate proto files with correct tool versions
Regenerated using protoc v3.17.3 and protoc-gen-ts_proto v2.6.1
to match the original project configuration.
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com >
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com >
Co-authored-by: whyour <22700758+whyour@users.noreply.github.com >
2025-11-14 23:20:56 +08:00
whyour
aedd48c9c4
修改错误日志
2025-11-14 22:23:30 +08:00
whyour
07951964a1
修复模块注入
2025-10-26 22:32:03 +08:00
whyour
87b934aafe
QLAPI.systemNotify 支持自定义通知类型和参数
2025-06-24 02:00:51 +08:00
whyour
d871585eee
修改服务启动逻辑
2025-05-07 09:30:00 +08:00
whyour
124e01e93a
修复 QLAPI 修复环境变量 remarks,esm 依赖查不到
2025-04-19 01:38:43 +08:00
whyour
25e8e8198d
修改 QLAPI 调用校验
2025-01-30 00:55:48 +08:00
whyour
6df651aa63
更新 ts-proto 版本
2025-01-29 23:29:45 +08:00
whyour
6775f5d123
修复 QLAPI 系统通知响应
2025-01-12 17:02:21 +08:00
whyour
ad6e08525c
修改 QLAPI 系统通知
2025-01-12 15:39:28 +08:00
whyour
e5b35273f9
修复更新环境变量
2025-01-11 17:14:30 +08:00
whyour
647ed3b66c
QLAPI 支持操作环境变量和系统通知
2025-01-11 01:59:46 +08:00
whyour
ab27a4c908
更新 node 依赖
2024-12-12 00:26:11 +08:00
whyour
8b8eae211b
增加任务重复运行提醒
2024-08-23 09:37:26 +08:00
whyour
37bcb77be0
修复健康检查命令
2023-12-24 15:48:34 +08:00
whyour
be1d68c0d1
修改 schedule 服务代理环境变量
2023-12-10 21:53:23 +08:00
whyour
ec5b885476
修改任务队列执行日志
2023-10-06 02:34:40 +08:00
whyour
ab3fc9b5f1
定时任务增加运行任务前和运行任务后参数
2023-09-19 22:44:32 +08:00
whyour
acc7443004
定时任务支持多个定时规则
2023-09-16 00:15:50 +08:00
whyour
4618a19c04
修改本地监听 ip
2023-08-29 21:50:23 +08:00
whyour
648b9c4520
修改系统日志时间打印
2023-08-26 20:51:17 +08:00
whyour
e9416c23df
增加任务运行数日志
2023-08-25 19:25:12 +08:00
whyour
4f7649f157
系统设置增加系统运行日志
2023-08-21 00:10:43 +08:00
whyour
a9b9c4d7ad
修复错误信息展示
2023-08-06 20:56:59 +08:00
whyour
39bfd39559
修复任务详情日志列表卡顿
2023-07-27 23:15:48 +08:00
whyour
6832cb4e22
修复 6 位 cron 不以 task 开头运行失败
2023-07-25 22:18:35 +08:00
whyour
5b1accffb7
修改 api 限流策略,修复检查检查日志
2023-06-07 22:45:37 +08:00
whyour
f8dfee8945
重构任务并发执行逻辑
2023-05-30 16:32:00 +08:00
whyour
ffba7ee4a1
增加定时任务服务启动失败日志
2023-05-25 21:45:28 +08:00
whyour
5baa8e4391
增加 pm2 平滑重启
2023-05-06 00:09:03 +08:00
whyour
c84908d7fa
修复运行命令api任务日志路径
2023-05-04 10:25:04 +08:00
whyour
d11d6d0c18
增加容器健康检查
2023-05-02 22:11:50 +08:00
whyour
f267720af4
修复初始化定时服务运行非禁用任务
2023-04-17 13:36:37 +08:00
whyour
ebb9676a51
修复定时服务启动路径
2023-04-08 21:58:34 +08:00
whyour
6fb39ce835
重构六位定时任务服务
2023-04-08 17:07:06 +08:00