MCPcopy Create free account
hub / github.com/ShipSecAI/studio / updateSchedule

Method updateSchedule

backend/src/temporal/temporal.service.ts:380–408  ·  view source on GitHub ↗
(options: UpdateTemporalScheduleInput)

Source from the content-addressed store, hash-verified

378 }
379
380 async updateSchedule(options: UpdateTemporalScheduleInput): Promise<void> {
381 const client = await this.getScheduleClient();
382 const handle = client.getHandle(options.scheduleId);
383 await handle.update((previous) => ({
384 spec: {
385 cronExpressions: [options.cronExpression],
386 timezone: options.timezone,
387 },
388 memo: options.memo,
389 action: {
390 type: 'startWorkflow',
391 workflowType: 'scheduleTriggerWorkflow',
392 taskQueue: this.defaultTaskQueue,
393 args: [options.dispatchArgs],
394 workflowId: `schedule-${options.scheduleId}`,
395 },
396 policies: {
397 overlap: this.mapOverlapPolicy(options.overlapPolicy),
398 catchupWindow: options.catchupWindowSeconds
399 ? options.catchupWindowSeconds * 1000
400 : undefined,
401 },
402 state: {
403 paused: previous.state.paused,
404 note: previous.state.note,
405 remainingActions: previous.state.remainingActions,
406 },
407 }));
408 }
409
410 async deleteSchedule(scheduleId: string): Promise<void> {
411 const client = await this.getScheduleClient();

Callers 2

api.tsFile · 0.45
updateMethod · 0.45

Calls 3

getScheduleClientMethod · 0.95
mapOverlapPolicyMethod · 0.95
updateMethod · 0.45

Tested by

no test coverage detected