Skip to content

Commit

Permalink
use tsc for building
Browse files Browse the repository at this point in the history
  • Loading branch information
gc committed Jul 8, 2024
1 parent 6760a69 commit 0d24af7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ENV CI=true
RUN cp .env.test .env
RUN cp src/config.example.ts src/config.ts

RUN yarn run build:esbuild
RUN yarn run build:tsc

ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.9.0/wait /wait
RUN chmod +x /wait
Expand Down
19 changes: 13 additions & 6 deletions src/lib/workers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,24 @@ const maxThreads = production ? 3 : 1;

const dirName = __dirname.replace('src/lib', 'dist/lib');

const finishWorkerPath = resolve(dirName, 'lib', 'workers', 'finish.worker.js');
const killWorkerPath = resolve(dirName, 'lib', 'workers', 'kill.worker.js');
const casketWorkerPath = resolve(dirName, 'lib', 'workers', 'casket.worker.js');

const finishWorker = new Piscina({
filename: resolve(dirName, 'finish.worker.js'),
maxThreads
filename: finishWorkerPath,
maxThreads,
workerData: { fullpath: finishWorkerPath }
});
const killWorker = new Piscina({
filename: resolve(dirName, 'kill.worker.js'),
maxThreads
filename: killWorkerPath,
maxThreads,
workerData: { fullpath: killWorkerPath }
});
const casketWorker = new Piscina({
filename: resolve(dirName, 'casket.worker.js'),
maxThreads
filename: casketWorkerPath,
maxThreads,
workerData: { fullpath: casketWorkerPath }
});

export const Workers = {
Expand Down

0 comments on commit 0d24af7

Please sign in to comment.