From 1d796a959738f6f3f61fce2253855b40be500ceb Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 2 Dec 2023 10:20:05 +0100 Subject: [PATCH] Bugfix/change intraday data gathering to operate synchronously (#2705) * Change intraday data gathering to operate synchronously * Update changelog --- CHANGELOG.md | 4 ++++ apps/api/src/services/data-provider/data-provider.service.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2aa09c05a..a865536aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Respected the `withExcludedAccounts` flag in the account balance time series +### Fixed + +- Changed the mechanism of the `INTRADAY` data gathering to operate synchronously avoiding database deadlocks + ## 2.27.1 - 2023-11-28 ### Changed diff --git a/apps/api/src/services/data-provider/data-provider.service.ts b/apps/api/src/services/data-provider/data-provider.service.ts index ef5143475..cd5874ca7 100644 --- a/apps/api/src/services/data-provider/data-provider.service.ts +++ b/apps/api/src/services/data-provider/data-provider.service.ts @@ -346,7 +346,7 @@ export class DataProviderService { ); try { - this.marketDataService.updateMany({ + await this.marketDataService.updateMany({ data: Object.keys(response) .filter((symbol) => { return (