Skip to content

Commit

Permalink
Update in memory datetime, after DB write. (#3222)
Browse files Browse the repository at this point in the history
Updates last updated time of search param status only after successful DB write.

Refs AB#101603
  • Loading branch information
feordin committed Apr 11, 2023
1 parent 6dc01f6 commit 853df9f
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -227,13 +227,13 @@ internal async Task ApplySearchParameterStatus(IReadOnlyCollection<ResourceSearc
}
}

_searchParameterStatusDataStore.SyncStatuses(updatedSearchParameterStatus);

if (updatedSearchParameterStatus.Any())
{
_latestSearchParams = updatedSearchParameterStatus.Select(p => p.LastUpdated).Max();
}

_searchParameterStatusDataStore.SyncStatuses(updatedSearchParameterStatus);

await _mediator.Publish(new SearchParametersUpdatedNotification(updated), cancellationToken);
}

Expand Down

0 comments on commit 853df9f

Please sign in to comment.