79
}
80
82
>
execution := &commonpb.WorkflowExecution{
83
>
WorkflowId: key.GetWorkflowID(),
84
>
RunId: key.GetRunID(),
85
>
}
86
>
// workflowCache will automatically use short context timeout when
87
>
// locking workflow for all background calls, we don't need a separate context here
88
>
weContext, release, err := workflowCache.GetOrCreateChasmExecution(
89
>
ctx,
90
>
shardContext,
91
>
namespaceID,
92
>
execution,
93
>
archetypeID,
94
>
lockPriority,
95
>
)
96
>
if common.IsContextDeadlineExceededErr(err) {
97
// TODO: make sure this doesn't count against our SLA if this happens while handling an API request.
98
err = consts.ErrResourceExhaustedBusyWorkflow
99
}
101
}
102