278
// This method returns an error when the GetNamespaceByID call fails with anything other than
279
// serviceerror.NamespaceNotFound.
280
>
func (r *TaskGeneratorImpl) getRetention() (time.Duration, error) {
task_generator.go
281
>
retention := defaultWorkflowRetention
282
>
executionInfo := r.mutableState.GetExecutionInfo()
283
>
namespaceEntry, err := r.namespaceRegistry.GetNamespaceByID(namespace.ID(executionInfo.NamespaceId))
284
>
switch err.(type) {
285
case nil:
286
retention = namespaceEntry.Retention()