feat(server): enable job queue log (#11390)

This commit is contained in:
fengmk2
2025-04-02 09:34:13 +00:00
parent 51b3f2b057
commit 432634c5a3
2 changed files with 3 additions and 3 deletions

View File

@@ -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);

View File

@@ -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;
}