@hatchet-dev/typescript-sdk 0.4.2 → 0.4.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.
|
@@ -134,6 +134,7 @@ class ActionListener {
|
|
|
134
134
|
catch (e) {
|
|
135
135
|
if (e.code === nice_grpc_1.Status.UNIMPLEMENTED) {
|
|
136
136
|
// break out of interval
|
|
137
|
+
this.logger.error('Heartbeat not implemented, closing heartbeat');
|
|
137
138
|
this.closeHeartbeat();
|
|
138
139
|
return;
|
|
139
140
|
}
|
|
@@ -148,6 +149,7 @@ class ActionListener {
|
|
|
148
149
|
closeHeartbeat() {
|
|
149
150
|
if (this.heartbeatInterval) {
|
|
150
151
|
clearInterval(this.heartbeatInterval);
|
|
152
|
+
this.heartbeatInterval = null;
|
|
151
153
|
}
|
|
152
154
|
}
|
|
153
155
|
getListenClient() {
|
package/clients/worker/worker.js
CHANGED
|
@@ -201,8 +201,8 @@ class Worker {
|
|
|
201
201
|
const future = new hatchet_promise_1.default(run().then(success).catch(failure));
|
|
202
202
|
this.futures[action.getGroupKeyRunId] = future;
|
|
203
203
|
// Send the action event to the dispatcher
|
|
204
|
-
const event = this.
|
|
205
|
-
this.client.dispatcher.
|
|
204
|
+
const event = this.getGroupKeyActionEvent(action, dispatcher_1.GroupKeyActionEventType.GROUP_KEY_EVENT_TYPE_STARTED);
|
|
205
|
+
this.client.dispatcher.sendGroupKeyActionEvent(event);
|
|
206
206
|
}
|
|
207
207
|
catch (e) {
|
|
208
208
|
this.logger.error(`Could not send action event: ${e.message}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hatchet-dev/typescript-sdk",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "Background task orchestration & visibility for developers",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -34,10 +34,8 @@
|
|
|
34
34
|
"example:event": "npm run exec -- ./examples/example-event.ts",
|
|
35
35
|
"example:event-listen": "npm run exec -- ./examples/example-event-with-results.ts",
|
|
36
36
|
"worker:namespaced": "npm run exec -- ./examples/namespaced-worker.ts",
|
|
37
|
-
|
|
38
37
|
"worker:rate": "npm run exec -- ./examples/rate-limit/worker.ts",
|
|
39
38
|
"example:rate": "npm run exec -- ./examples/rate-limit/events.ts",
|
|
40
|
-
|
|
41
39
|
"worker:fanout": "npm run exec -- ./examples/fanout-worker.ts",
|
|
42
40
|
"worker:simple": "npm run exec -- ./examples/simple-worker.ts",
|
|
43
41
|
"manual:trigger": "npm run exec -- ./examples/manual-trigger.ts",
|