2022-12-21 14:06:33 +00:00
|
|
|
import Bree from 'bree';
|
|
|
|
|
import path from 'path';
|
2023-01-12 15:43:41 +00:00
|
|
|
import Cabin from 'cabin';
|
2022-12-21 14:06:33 +00:00
|
|
|
import TSBree from '@breejs/ts-worker';
|
|
|
|
|
|
|
|
|
|
export const isDev = process.env['NODE_ENV'] === 'development';
|
|
|
|
|
|
|
|
|
|
Bree.extend(TSBree);
|
|
|
|
|
|
|
|
|
|
const options: any = {
|
|
|
|
|
defaultExtension: 'js',
|
2023-01-13 13:17:36 +00:00
|
|
|
logger: false,
|
2023-01-12 15:43:41 +00:00
|
|
|
jobs: [{ name: 'applicationBuildQueue' }]
|
2022-12-21 14:06:33 +00:00
|
|
|
};
|
2022-12-29 21:33:31 +00:00
|
|
|
if (isDev) options.root = path.join(__dirname, './jobs');
|
2022-12-21 14:06:33 +00:00
|
|
|
|
|
|
|
|
export const scheduler = new Bree(options);
|