Skip to content

Commit

Permalink
#32 change worker relative path to absolute
Browse files Browse the repository at this point in the history
  • Loading branch information
wilk committed Jan 13, 2019
1 parent 73ab18c commit 64e3c85
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/worker-pool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { Worker } from 'worker_threads'
import v8 from 'v8'
import os from 'os'
import path from 'path'
import { Task, WorkerWrapper } from './interfaces'

const WORKER_STATE_READY = 'ready'
Expand All @@ -21,7 +22,7 @@ class WorkerPool {

resurrect(deadWorker: WorkerWrapper): void {
// self healing procedure
const worker = new Worker(`${__dirname}/worker.js`)
const worker = new Worker(path.resolve(__dirname, './worker.js'))

deadWorker.status = WORKER_STATE_SPAWNING
deadWorker.worker = worker
Expand Down

0 comments on commit 64e3c85

Please sign in to comment.