Skip to content

Commit

Permalink
Keep service scope alive (#8270)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasfj authored Nov 11, 2024
1 parent 214a5cf commit 290625e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/lib/service/entrypoint/analyzer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ Future _workerMain(EntryMessage message) async {
await popularityStorage.start();
await downloadCountsBackend.start();
await taskBackend.start();
registerScopeExitCallback(() => taskBackend.stop());

setupAnalyzerPeriodicTasks();
setupSearchPeriodicTasks();
Expand All @@ -86,4 +87,8 @@ Future _apiExporterMain(EntryMessage message) async {
await popularityStorage.start();
await downloadCountsBackend.start();
await apiExporter!.start();
registerScopeExitCallback(() => apiExporter!.stop());

// wait indefinitely
await Completer().future;
}

0 comments on commit 290625e

Please sign in to comment.