@opentermsarchive/engine 0.34.2 → 0.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentermsarchive/engine",
3
- "version": "0.34.2",
3
+ "version": "0.35.0",
4
4
  "description": "Tracks and makes visible changes to the terms of online services",
5
5
  "homepage": "https://github.com/OpenTermsArchive/engine#readme",
6
6
  "bugs": {
@@ -112,7 +112,9 @@ export default class Archivist extends events.EventEmitter {
112
112
  });
113
113
  });
114
114
 
115
- await this.trackingQueue.drain();
115
+ if (this.trackingQueue.length()) {
116
+ await this.trackingQueue.drain();
117
+ }
116
118
 
117
119
  await Promise.all([ stopHeadlessBrowser(), this.recorder.finalize() ]);
118
120
  this.emit('trackingCompleted', servicesIds.length, Service.getNumberOfTerms(this.services, servicesIds), extractOnly);
@@ -152,14 +154,6 @@ export default class Archivist extends events.EventEmitter {
152
154
  throw error;
153
155
  }
154
156
 
155
- if (error.message.includes('EAI_AGAIN')) {
156
- // EAI_AGAIN is a DNS lookup timed out error, which means it is a network connectivity error or proxy related error.
157
- // This operational error is mostly transient and should be handled by retrying the operation.
158
- // As there is no retry mechanism in the engine yet, crash the engine and leave it to the process
159
- // manager to handle the retries and the delay between them.
160
- throw error;
161
- }
162
-
163
157
  inaccessibleContentErrors.push(error.message);
164
158
  }
165
159
  }));