feat(scheduler): 财务管道自动注册、水位记录与后台状态页
- 老配置读取时自动补齐六个管道任务,升级后无需手工添加 - 每个管道运行后写水位与 last_success_at,失败写 last_error - 新增 GET /admin/fulfillment/pipeline/status 与单步重跑 - 后台「履约渠道 → 管道状态」展示启停、水位、最近执行与错误 - 定时任务管理接口不再丢弃管道自己的 config 字段
This commit is contained in:
@@ -127,7 +127,10 @@ function mapAdminScheduledJobsConfig(config: JsonObject = {}) {
|
||||
enabled: item.enabled === true,
|
||||
intervalSeconds: Number(item.intervalSeconds || 300),
|
||||
cooldownSeconds: Number(item.cooldownSeconds || 1800),
|
||||
// 保留各任务自己的配置键(管道作业的 batchSize / maxBatches / days 等),
|
||||
// 避免管理接口读一次就把没列出来的字段丢掉。
|
||||
config: {
|
||||
...(item.config && typeof item.config === 'object' ? item.config : {}),
|
||||
assetThreshold: normalizeNonNegativeNumber(item.config?.assetThreshold, 500),
|
||||
accounts: Array.isArray(item.config?.accounts) ? item.config.accounts : [],
|
||||
pageSize: Number(item.config?.pageSize || 0) || undefined,
|
||||
|
||||
Reference in New Issue
Block a user