Skip to content

Commit

Permalink
Renamed worker_threads.Worker to WorkerThread to distinguish between …
Browse files Browse the repository at this point in the history
…BullMQ Worker
  • Loading branch information
andris9 committed Nov 12, 2024
1 parent e20920d commit 0af3e5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ process.env.UV_THREADPOOL_SIZE =
// cache before wild-config
const argv = process.argv.slice(2);

const { Worker, SHARE_ENV } = require('worker_threads');
const { Worker: WorkerThread, SHARE_ENV } = require('worker_threads');
const packageData = require('./package.json');
const config = require('wild-config');
const logger = require('./lib/logger');
Expand Down Expand Up @@ -695,7 +695,7 @@ let spawnWorker = async type => {
await updateServerState(type, 'spawning');
}

let worker = new Worker(pathlib.join(__dirname, 'workers', `${type.replace(/[A-Z]/g, c => `-${c.toLowerCase()}`)}.js`), {
let worker = new WorkerThread(pathlib.join(__dirname, 'workers', `${type.replace(/[A-Z]/g, c => `-${c.toLowerCase()}`)}.js`), {
argv,
env: SHARE_ENV,
trackUnmanagedFds: true
Expand Down

0 comments on commit 0af3e5a

Please sign in to comment.