19
[]nexusoperationpb.OperationStatus{nexusoperationpb.OPERATION_STATUS_UNSPECIFIED},
20
nexusoperationpb.OPERATION_STATUS_SCHEDULED,
22
>
o.Attempt++
23
>
// Emit an invocation task to start the operation.
24
>
// The destination is the endpoint name, which routes the task to the correct outbound queue.
25
>
ctx.AddTask(o, chasm.TaskAttributes{Destination: o.GetEndpoint()}, &nexusoperationpb.InvocationTask{
26
>
Attempt: o.Attempt,
27
>
})
28
>
29
>
// Emit a schedule-to-start timeout task if configured
30
>
if o.ScheduleToStartTimeout != nil && o.ScheduleToStartTimeout.AsDuration() != 0 {
31
deadline := o.ScheduledTime.AsTime().Add(o.ScheduleToStartTimeout.AsDuration())
32
ctx.AddTask(o, chasm.TaskAttributes{