remove unnecessary things
This commit is contained in:
@@ -135,32 +135,32 @@ export const asyncSleep = (delay: number): Promise<unknown> =>
|
||||
new Promise((resolve) => setTimeout(resolve, delay));
|
||||
export const prisma = new PrismaClient({
|
||||
errorFormat: 'minimal',
|
||||
log: [
|
||||
{
|
||||
emit: 'event',
|
||||
level: 'query',
|
||||
},
|
||||
{
|
||||
emit: 'stdout',
|
||||
level: 'error',
|
||||
},
|
||||
{
|
||||
emit: 'stdout',
|
||||
level: 'info',
|
||||
},
|
||||
{
|
||||
emit: 'stdout',
|
||||
level: 'warn',
|
||||
},
|
||||
],
|
||||
// log: [
|
||||
// {
|
||||
// emit: 'event',
|
||||
// level: 'query',
|
||||
// },
|
||||
// {
|
||||
// emit: 'stdout',
|
||||
// level: 'error',
|
||||
// },
|
||||
// {
|
||||
// emit: 'stdout',
|
||||
// level: 'info',
|
||||
// },
|
||||
// {
|
||||
// emit: 'stdout',
|
||||
// level: 'warn',
|
||||
// },
|
||||
// ],
|
||||
});
|
||||
|
||||
prisma.$on('query', (e) => {
|
||||
// prisma.$on('query', (e) => {
|
||||
// console.log({e})
|
||||
// console.log('Query: ' + e.query)
|
||||
// console.log('Params: ' + e.params)
|
||||
// console.log('Duration: ' + e.duration + 'ms')
|
||||
})
|
||||
// })
|
||||
export const base64Encode = (text: string): string => {
|
||||
return Buffer.from(text).toString('base64');
|
||||
};
|
||||
|
@@ -9,7 +9,8 @@ Bree.extend(TSBree);
|
||||
|
||||
const options: any = {
|
||||
defaultExtension: 'js',
|
||||
logger: new Cabin(),
|
||||
// logger: new Cabin(),
|
||||
logger: false,
|
||||
workerMessageHandler: async ({ name, message }) => {
|
||||
if (name === 'deployApplication' && message?.deploying) {
|
||||
if (scheduler.workers.has('autoUpdater') || scheduler.workers.has('cleanupStorage')) {
|
||||
@@ -24,7 +25,6 @@ const options: any = {
|
||||
};
|
||||
if (isDev) options.root = path.join(__dirname, '../jobs');
|
||||
|
||||
|
||||
export const scheduler = new Bree(options);
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user