(workflow, options)
| 1025 | ), |
| 1026 | |
| 1027 | scheduleClock(workflow, options) { |
| 1028 | // Compute the deadline once, so a retried save keeps the original wake-up. |
| 1029 | return Effect.flatMap(DateTime.now, (now) => |
| 1030 | retryPersistence(sendDiscard({ |
| 1031 | rpc: ClockRpc, |
| 1032 | address: entityAddressFor({ |
| 1033 | workflow, |
| 1034 | entityType: ClockEntity.type, |
| 1035 | executionId: options.executionId |
| 1036 | }), |
| 1037 | payload: { |
| 1038 | name: options.clock.name, |
| 1039 | workflowName: workflow._tag, |
| 1040 | wakeUp: DateTime.mapEpochMillis( |
| 1041 | DateTime.addDuration(now, options.clock.duration), |
| 1042 | Math.ceil |
| 1043 | ) |
| 1044 | } |
| 1045 | }))) |
| 1046 | } |
| 1047 | }) |
| 1048 | |
| 1049 | return engine |
nothing calls this directly
no test coverage detected