@data-fair/lib-node 2.1.0 → 2.1.1

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": "@data-fair/lib-node",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Small nodejs related utility functions for the data-fair stack.",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -14,8 +14,11 @@ export default async function (db, locks, basePath = './') {
14
14
  // containers for the scripts that are running in only 1 (while loop on "acquire" ?) and a healthcheck
15
15
  // are not considered "up" and the previous versions keep running in the mean time
16
16
  } else {
17
- await runScripts(db, basePath)
18
- await locks.release('upgrade')
17
+ try {
18
+ await runScripts(db, basePath)
19
+ } finally {
20
+ await locks.release('upgrade')
21
+ }
19
22
  }
20
23
  }
21
24
  async function runScripts (db, basePath) {