(options: UpdateTemporalScheduleInput)
| 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(); |
no test coverage detected