Skip to content

Commit

Permalink
Merge pull request #2521 from terascope/api-error-fix
Browse files Browse the repository at this point in the history
v0.73.2 - Execution Controller initialize fix
  • Loading branch information
jsnoble authored Feb 24, 2021
2 parents e558d8d + be0d088 commit fdb4556
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "teraslice-workspace",
"displayName": "Teraslice",
"version": "0.73.1",
"version": "0.73.2",
"private": true,
"homepage": "https://github.com/terascope/teraslice",
"bugs": {
Expand Down
11 changes: 10 additions & 1 deletion packages/teraslice/lib/workers/execution-controller/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,14 +240,23 @@ class ExecutionController {
this.slicerAnalytics = makeSliceAnalytics(this.context, this.executionContext);
}

await this.scheduler.initialize();
// This initializes user code, need to throw terminal error
// so it can be surfaced
try {
await this.scheduler.initialize();
} catch (err) {
await this._terminalError(err);
throw err;
}

this.logger.info(`execution: ${this.exId} initialized execution_controller`);

this.isInitialized = true;
}

async run() {
if (!this.isInitialized) return;

this._startWorkConnectWatchDog();

this.executionAnalytics.start();
Expand Down
2 changes: 1 addition & 1 deletion packages/teraslice/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "teraslice",
"displayName": "Teraslice",
"version": "0.73.1",
"version": "0.73.2",
"description": "Distributed computing platform for processing JSON data",
"homepage": "https://github.com/terascope/teraslice#readme",
"bugs": {
Expand Down

0 comments on commit fdb4556

Please sign in to comment.