@platformatic/runtime 3.0.3 → 3.0.4

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.
Files changed (3) hide show
  1. package/lib/runtime.js +13 -12
  2. package/package.json +15 -15
  3. package/schema.json +1 -1
package/lib/runtime.js CHANGED
@@ -1464,7 +1464,7 @@ export class Runtime extends EventEmitter {
1464
1464
  return health
1465
1465
  }
1466
1466
 
1467
- #setupHealthCheck (config, applicationConfig, workersCount, id, index, worker, errorLabel, timeout) {
1467
+ #setupHealthCheck (config, applicationConfig, workersCount, id, index, worker, errorLabel) {
1468
1468
  // Clear the timeout when exiting
1469
1469
  worker.on('exit', () => clearTimeout(worker[kHealthCheckTimer]))
1470
1470
 
@@ -1538,7 +1538,7 @@ export class Runtime extends EventEmitter {
1538
1538
  } else {
1539
1539
  worker[kHealthCheckTimer].refresh()
1540
1540
  }
1541
- }, timeout ?? interval)
1541
+ }, interval)
1542
1542
  }
1543
1543
 
1544
1544
  async #startWorker (
@@ -1606,16 +1606,17 @@ export class Runtime extends EventEmitter {
1606
1606
  if (enabled && config.restartOnError > 0) {
1607
1607
  // if gracePeriod is 0, it will be set to 1 to start health checks immediately
1608
1608
  // however, the health event will start when the worker is started
1609
- this.#setupHealthCheck(
1610
- config,
1611
- applicationConfig,
1612
- workersCount,
1613
- id,
1614
- index,
1615
- worker,
1616
- label,
1617
- gracePeriod > 0 ? gracePeriod : 1
1618
- )
1609
+ setTimeout(() => {
1610
+ this.#setupHealthCheck(
1611
+ config,
1612
+ applicationConfig,
1613
+ workersCount,
1614
+ id,
1615
+ index,
1616
+ worker,
1617
+ label
1618
+ )
1619
+ }, gracePeriod > 0 ? gracePeriod : 1).unref()
1619
1620
  }
1620
1621
  } catch (err) {
1621
1622
  const error = ensureError(err)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/runtime",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -34,14 +34,14 @@
34
34
  "typescript": "^5.5.4",
35
35
  "undici-oidc-interceptor": "^0.5.0",
36
36
  "why-is-node-running": "^2.2.2",
37
- "@platformatic/composer": "3.0.3",
38
- "@platformatic/db": "3.0.3",
39
- "@platformatic/gateway": "3.0.3",
40
- "@platformatic/node": "3.0.3",
41
- "@platformatic/service": "3.0.3",
42
- "@platformatic/sql-graphql": "3.0.3",
43
- "@platformatic/sql-mapper": "3.0.3",
44
- "@platformatic/wattpm-pprof-capture": "3.0.3"
37
+ "@platformatic/composer": "3.0.4",
38
+ "@platformatic/node": "3.0.4",
39
+ "@platformatic/db": "3.0.4",
40
+ "@platformatic/service": "3.0.4",
41
+ "@platformatic/gateway": "3.0.4",
42
+ "@platformatic/sql-graphql": "3.0.4",
43
+ "@platformatic/sql-mapper": "3.0.4",
44
+ "@platformatic/wattpm-pprof-capture": "3.0.4"
45
45
  },
46
46
  "dependencies": {
47
47
  "@fastify/accepts": "^5.0.0",
@@ -71,12 +71,12 @@
71
71
  "undici": "^7.0.0",
72
72
  "undici-thread-interceptor": "^0.14.0",
73
73
  "ws": "^8.16.0",
74
- "@platformatic/basic": "3.0.3",
75
- "@platformatic/generators": "3.0.3",
76
- "@platformatic/foundation": "3.0.3",
77
- "@platformatic/itc": "3.0.3",
78
- "@platformatic/metrics": "3.0.3",
79
- "@platformatic/telemetry": "3.0.3"
74
+ "@platformatic/basic": "3.0.4",
75
+ "@platformatic/foundation": "3.0.4",
76
+ "@platformatic/itc": "3.0.4",
77
+ "@platformatic/metrics": "3.0.4",
78
+ "@platformatic/generators": "3.0.4",
79
+ "@platformatic/telemetry": "3.0.4"
80
80
  },
81
81
  "engines": {
82
82
  "node": ">=22.18.0"
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/runtime/3.0.3.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/runtime/3.0.4.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Runtime Config",
5
5
  "type": "object",