131
shardCtx historyi.ShardContext,
132
ms historyi.MutableState,
134
>
// TODO(stephanos): remove this hack
135
>
if existingLease != nil {
136
return existingLease, nil
137
}
139
>
workflow.NewContext(
140
>
shardCtx.GetConfig(),
141
>
definition.NewWorkflowKey(
142
>
ms.GetNamespaceEntry().ID().String(),
143
>
ms.GetExecutionInfo().WorkflowId,
144
>
ms.GetExecutionState().RunId,
145
>
),
146
>
chasm.WorkflowArchetypeID,
147
>
shardCtx.GetLogger(),
148
>
shardCtx.GetThrottledLogger(),
149
>
shardCtx.GetMetricsHandler(),
150
>
),
151
>
wcache.NoopReleaseFn,
152
>
ms,
153
>
), nil
154
}
155