Skip to content

Commit

Permalink
fix: worker path corrected & errors throwed
Browse files Browse the repository at this point in the history
  • Loading branch information
sbayd committed Mar 6, 2023
1 parent bf9c1c7 commit 53dd7d1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Zenith new way of JS monorepo builds
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@jotforminc/zenith",
"packageManager": "[email protected]",
"version": "0.2.2",
"version": "0.3.0",
"description": "",
"main": "./build/index.js",
"files": [
Expand Down
6 changes: 3 additions & 3 deletions src/classes/WorkerHelper.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import workerpool from 'workerpool';
import { readFileSync } from 'fs';
import * as path from 'path';
import ConfigHelper from './ConfigHelper';

export default class WorkerHelper {
started = new Set();

constructor() {
this.pool = workerpool.pool(__dirname, { maxWorkers: 6, workerType: 'thread' });
this.pool = workerpool.pool(__dirname + '/worker.js', { maxWorkers: 6, workerType: 'thread' });
this.buildConfigJSON = ConfigHelper.buildConfigJSON;
}

Expand All @@ -18,6 +16,7 @@ export default class WorkerHelper {
})
} catch (error) {
console.log(error);
throw error;
}
}

Expand All @@ -28,6 +27,7 @@ export default class WorkerHelper {
});
} catch (error) {
console.log(error);
throw error;
}
}
}

0 comments on commit 53dd7d1

Please sign in to comment.