@travetto/worker 2.2.0 → 2.2.3

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 (2) hide show
  1. package/README.md +2 -1
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -145,6 +145,7 @@ export async function main(): Promise<void> {
145
145
 
146
146
  **Code: Spawned Worker**
147
147
  ```typescript
148
+ import * as timers from 'timers/promises';
148
149
  import { ChildCommChannel } from '@travetto/worker';
149
150
 
150
151
  export async function main(): Promise<void> {
@@ -155,7 +156,7 @@ export async function main(): Promise<void> {
155
156
 
156
157
  exec.send('ready'); // Indicate the child is ready to receive requests
157
158
 
158
- const heartbeat = (): void => { setTimeout(heartbeat, 5000); }; // Keep-alive
159
+ const heartbeat = (): void => { timers.setTimeout(5000).then(heartbeat); }; // Keep-alive
159
160
  heartbeat();
160
161
  }
161
162
  ```
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@travetto/worker",
3
3
  "displayName": "Worker",
4
- "version": "2.2.0",
4
+ "version": "2.2.3",
5
5
  "description": "Process management utilities, with a focus on inter-process communication",
6
6
  "keywords": [
7
7
  "exec",
@@ -26,7 +26,7 @@
26
26
  "directory": "module/worker"
27
27
  },
28
28
  "dependencies": {
29
- "@travetto/base": "^2.2.0",
29
+ "@travetto/base": "^2.2.3",
30
30
  "@types/generic-pool": "^3.1.11",
31
31
  "generic-pool": "^3.8.2"
32
32
  },