mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
feat(server): enable job queue log (#11390)
This commit is contained in:
@@ -72,9 +72,9 @@ export class JobExecutor implements OnModuleDestroy {
|
||||
|
||||
const signature = `[${name}] (${handler.name})`;
|
||||
try {
|
||||
this.logger.debug(`Job started: ${signature}`);
|
||||
this.logger.log(`Job started: ${signature}`);
|
||||
const ret = await handler.fn(payload);
|
||||
this.logger.debug(`Job finished: ${signature}`);
|
||||
this.logger.log(`Job finished: ${signature}, signal=${ret}`);
|
||||
return ret;
|
||||
} catch (e) {
|
||||
this.logger.error(`Job failed: ${signature}`, e);
|
||||
|
||||
@@ -15,7 +15,7 @@ export class JobQueue {
|
||||
const ns = namespace(name);
|
||||
const queue = this.getQueue(ns);
|
||||
const job = await queue.add(name, payload, opts);
|
||||
this.logger.debug(`Job [${name}] added; id=${job.id}`);
|
||||
this.logger.log(`Job [${name}] added; id=${job.id}`);
|
||||
return job;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user