@temporalio/worker
Advanced tools
Comparing version 1.4.2 to 1.4.3
@@ -59,2 +59,3 @@ /// <reference types="node" /> | ||
protected readonly shutdownSignalCallbacks: Set<() => void>; | ||
protected state: 'RUNNING' | 'SHUTTING_DOWN'; | ||
static _instance?: Runtime; | ||
@@ -61,0 +62,0 @@ static instantiator?: 'install' | 'instance'; |
@@ -90,2 +90,3 @@ "use strict"; | ||
this.shutdownSignalCallbacks = new Set(); | ||
this.state = 'RUNNING'; | ||
/** | ||
@@ -95,2 +96,3 @@ * Bound to `this` for use with `process.on` and `process.off` | ||
this.startShutdownSequence = () => { | ||
this.state = 'SHUTTING_DOWN'; | ||
this.teardownShutdownHook(); | ||
@@ -341,3 +343,8 @@ for (const callback of this.shutdownSignalCallbacks) { | ||
registerShutdownSignalCallback(callback) { | ||
this.shutdownSignalCallbacks.add(callback); | ||
if (this.state === 'RUNNING') { | ||
this.shutdownSignalCallbacks.add(callback); | ||
} | ||
else { | ||
queueMicrotask(callback); | ||
} | ||
} | ||
@@ -344,0 +351,0 @@ /** |
{ | ||
"name": "@temporalio/worker", | ||
"version": "1.4.2", | ||
"version": "1.4.3", | ||
"description": "Temporal.io SDK Worker sub-package", | ||
@@ -18,7 +18,7 @@ "main": "lib/index.js", | ||
"@swc/core": "^1.2.204", | ||
"@temporalio/activity": "^1.4.2", | ||
"@temporalio/common": "^1.4.2", | ||
"@temporalio/core-bridge": "^1.4.2", | ||
"@temporalio/proto": "^1.4.2", | ||
"@temporalio/workflow": "^1.4.2", | ||
"@temporalio/activity": "~1.4.3", | ||
"@temporalio/common": "~1.4.3", | ||
"@temporalio/core-bridge": "~1.4.3", | ||
"@temporalio/proto": "~1.4.3", | ||
"@temporalio/workflow": "~1.4.3", | ||
"abort-controller": "^3.0.0", | ||
@@ -52,3 +52,3 @@ "cargo-cp-artifact": "^0.1.6", | ||
], | ||
"gitHead": "d49c8530c67af77782b39a3f34c82922d8f8061e" | ||
"gitHead": "be51cfac7016b66151d70dbd5aca7f7ef02b260a" | ||
} |
@@ -104,2 +104,3 @@ import * as native from '@temporalio/core-bridge'; | ||
protected readonly shutdownSignalCallbacks = new Set<() => void>(); | ||
protected state: 'RUNNING' | 'SHUTTING_DOWN' = 'RUNNING'; | ||
@@ -385,3 +386,7 @@ static _instance?: Runtime; | ||
public registerShutdownSignalCallback(callback: () => void): void { | ||
this.shutdownSignalCallbacks.add(callback); | ||
if (this.state === 'RUNNING') { | ||
this.shutdownSignalCallbacks.add(callback); | ||
} else { | ||
queueMicrotask(callback); | ||
} | ||
} | ||
@@ -421,2 +426,3 @@ | ||
protected startShutdownSequence = (): void => { | ||
this.state = 'SHUTTING_DOWN'; | ||
this.teardownShutdownHook(); | ||
@@ -423,0 +429,0 @@ for (const callback of this.shutdownSignalCallbacks) { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
582377
10781
+ Added@temporalio/activity@1.4.4(transitive)
+ Added@temporalio/common@1.4.4(transitive)
+ Added@temporalio/core-bridge@1.4.4(transitive)
+ Added@temporalio/proto@1.4.4(transitive)
+ Added@temporalio/workflow@1.4.4(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedproto3-json-serializer@1.1.1(transitive)
+ Addedwhich@2.0.2(transitive)
- Removed@temporalio/activity@1.11.6(transitive)
- Removed@temporalio/common@1.11.6(transitive)
- Removed@temporalio/core-bridge@1.11.6(transitive)
- Removed@temporalio/proto@1.11.6(transitive)
- Removed@temporalio/workflow@1.11.6(transitive)
- Removedisexe@3.1.1(transitive)
- Removedms@3.0.0-canary.1(transitive)
- Removedproto3-json-serializer@2.0.2(transitive)
- Removedwhich@4.0.0(transitive)
Updated@temporalio/activity@~1.4.3
Updated@temporalio/common@~1.4.3
Updated@temporalio/proto@~1.4.3
Updated@temporalio/workflow@~1.4.3