feat(monitor): 超级编导自动追加,任务设置里按间隔补新作品
任务编辑里新增「自动从超级编导追加新作品」(抖音 + 作品模式才有): - 每 N 分钟(默认 2 小时)按**发布时间**查一次数据中心,把这段时间新发布、 还没在任务里的作品追加进去;已有的不会重复。 - start_time/end_time 实测按发布时间过滤,所以老活动里今天才发的作品也能 收到 —— 按活动创建时间筛会整批漏掉。 - 查询窗口首尾重叠 1 小时,兜住数据中心的索引延迟;失败时 last_at 不动, 恢复后这段时间的作品仍在窗口里,只把调度钟按 30 分钟退避重试。 - 同步跑在后台任务里,不阻塞采集调度。 Co-Authored-By: Claude <[email protected]>
This commit is contained in:
@@ -60,6 +60,15 @@ export interface MonitorTask {
|
||||
notify_enabled: boolean
|
||||
/** 推送**异常**(登录失效/运行失败/没抓到数据)。默认开。 */
|
||||
notify_failures: boolean
|
||||
/** 超级编导自动追加(只有抖音的作品模式任务能开)。 */
|
||||
superdir_auto_enabled: boolean
|
||||
superdir_auto_interval_minutes: number
|
||||
/** 下一次自动追加的时间(毫秒);关掉时是 null。 */
|
||||
superdir_auto_next_at: number | null
|
||||
/** 上一次**成功**追加的时间(毫秒),也是下次查询的窗口起点。 */
|
||||
superdir_auto_last_at: number | null
|
||||
superdir_auto_last_added: number | null
|
||||
superdir_auto_last_error: string
|
||||
/** Epoch milliseconds. */
|
||||
next_run_at: number | null
|
||||
last_run_at: number | null
|
||||
@@ -367,6 +376,8 @@ export interface TaskCreatePayload {
|
||||
enabled: boolean
|
||||
notify_enabled: boolean
|
||||
notify_failures: boolean
|
||||
superdir_auto_enabled: boolean
|
||||
superdir_auto_interval_minutes: number
|
||||
targets: string[]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user