MCPcopy Index your code
hub / github.com/QLHazyCoder/FlowPilot / persistAutoRunTimerPlan

Function persistAutoRunTimerPlan

background.js:3879–3897  ·  view source on GitHub ↗
(plan, extraState = {})

Source from the content-addressed store, hash-verified

3877}
3878
3879async function persistAutoRunTimerPlan(plan, extraState = {}) {
3880 const normalizedPlan = normalizeAutoRunTimerPlan(plan);
3881 if (!normalizedPlan) {
3882 throw new Error('自动运行计时计划无效。');
3883 }
3884
3885 const statusPayload = getAutoRunTimerStatusPayload(normalizedPlan);
3886 await broadcastAutoRunStatus(
3887 statusPayload.phase,
3888 statusPayload,
3889 {
3890 ...extraState,
3891 autoRunTimerPlan: normalizedPlan,
3892 scheduledAutoRunPlan: null,
3893 }
3894 );
3895 await ensureAutoRunTimerAlarm(normalizedPlan.fireAt);
3896 return normalizedPlan;
3897}
3898
3899function getAutoRunTimerResumeOptions(plan) {
3900 const normalizedPlan = normalizeAutoRunTimerPlan(plan);

Callers 3

scheduleAutoRunFunction · 0.85
waitBetweenAutoRunRoundsFunction · 0.85
waitBeforeAutoRunRetryFunction · 0.85

Calls 4

broadcastAutoRunStatusFunction · 0.85
ensureAutoRunTimerAlarmFunction · 0.85

Tested by

no test coverage detected