fix: worker
This commit is contained in:
@@ -134,9 +134,32 @@ export const asyncExecShellStream = async ({ debug, buildId, applicationId, comm
|
||||
export const asyncSleep = (delay: number): Promise<unknown> =>
|
||||
new Promise((resolve) => setTimeout(resolve, delay));
|
||||
export const prisma = new PrismaClient({
|
||||
errorFormat: 'minimal'
|
||||
errorFormat: 'minimal',
|
||||
log: [
|
||||
{
|
||||
emit: 'event',
|
||||
level: 'query',
|
||||
},
|
||||
{
|
||||
emit: 'stdout',
|
||||
level: 'error',
|
||||
},
|
||||
{
|
||||
emit: 'stdout',
|
||||
level: 'info',
|
||||
},
|
||||
{
|
||||
emit: 'stdout',
|
||||
level: 'warn',
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
// prisma.$on('query', (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');
|
||||
};
|
||||
|
Reference in New Issue
Block a user