mirror of
https://github.com/whyour/qinglong.git
synced 2026-11-17 15:51:07 +08:00
Reconcile scheduled and system cron triggers, isolate concurrent executions and retain verifiable exit statistics across restarts. Add paged task history, log and script browsing, dashboard timing details and regression coverage.
14 lines
598 B
TypeScript
14 lines
598 B
TypeScript
// The original scheduled CLI wire format maps to its existing persisted trigger ID.
|
|
export const executionIdPattern = /^(?:client-|legacy-system:\d{1,12}:)[a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12}$/;
|
|
export function executionTriggerId(id: string) {
|
|
return id.replace('legacy-system:', 'system-cli-').replace(':', '-');
|
|
}
|
|
|
|
// A header lets upgraded clients keep the same identified body on older panels.
|
|
export function receiptFinishTime(header?: string) {
|
|
if (header && /^\d{1,13}$/.test(header)) {
|
|
const time = Number(header);
|
|
if (time > 0 && time <= Date.now()) return time;
|
|
}
|
|
}
|