Skip to content

Commit

Permalink
Fix engine hang with non-existent service ID (#1050)
Browse files Browse the repository at this point in the history
  • Loading branch information
clementbiron authored Feb 13, 2024
2 parents 6d9bbb3 + 16499a1 commit 542b4d2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@

All changes that impact users of this module are documented in this file, in the [Common Changelog](https://common-changelog.org) format with some additional specifications defined in the CONTRIBUTING file. This codebase adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
## Unreleased [patch]

_Full changeset and discussions: [#1050](https://github.com/OpenTermsArchive/engine/pull/1050)._

> Development of this release was supported by the [French Ministry for Foreign Affairs](https://www.diplomatie.gouv.fr/fr/politique-etrangere-de-la-france/diplomatie-numerique/) through its ministerial [State Startups incubator](https://beta.gouv.fr/startups/open-terms-archive.html) under the aegis of the Ambassador for Digital Affairs.
### Fixed

- Fix engine hang with non-existent service ID

## 0.34.2 - 2024-02-12

Expand Down
4 changes: 3 additions & 1 deletion src/archivist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ export default class Archivist extends events.EventEmitter {
});
});

await this.trackingQueue.drain();
if (this.trackingQueue.length()) {
await this.trackingQueue.drain();
}

await Promise.all([ stopHeadlessBrowser(), this.recorder.finalize() ]);
this.emit('trackingCompleted', servicesIds.length, Service.getNumberOfTerms(this.services, servicesIds), extractOnly);
Expand Down

0 comments on commit 542b4d2

Please sign in to comment.