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

Method pause

backend/src/schedules/schedules.service.ts:210–223  ·  view source on GitHub ↗
(auth: AuthContext | null, id: string)

Source from the content-addressed store, hash-verified

208 }
209
210 async pause(auth: AuthContext | null, id: string): Promise<WorkflowSchedule> {
211 const existing = await this.findOwnedScheduleOrThrow(id, auth);
212 await this.workflowsService.ensureWorkflowAdminAccess(existing.workflowId, auth);
213 const temporalScheduleId = existing.temporalScheduleId ?? existing.id;
214 if (temporalScheduleId) {
215 await this.temporalService.pauseSchedule(temporalScheduleId);
216 }
217 const updated = await this.repository.update(
218 existing.id,
219 { status: 'paused' },
220 { organizationId: existing.organizationId },
221 );
222 return this.mapRecord(updated ?? existing);
223 }
224
225 async resume(auth: AuthContext | null, id: string): Promise<WorkflowSchedule> {
226 const existing = await this.findOwnedScheduleOrThrow(id, auth);

Callers 4

scheduleStore.tsFile · 0.45
useWorkflowSchedulesFunction · 0.45
pauseScheduleMethod · 0.45

Calls 5

mapRecordMethod · 0.95
pauseScheduleMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected