mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 05:29:26 +08:00
fix: test
This commit is contained in:
parent
478d836404
commit
91f8da7aa1
@ -150,6 +150,7 @@ export abstract class TaskType extends EventEmitter implements ITask {
|
||||
if (error instanceof CancelError) {
|
||||
this.statusChange({ type: 'cancelled' });
|
||||
this.logger?.info(`Task ${this.taskId} was cancelled during execution`);
|
||||
return;
|
||||
} else {
|
||||
this.status = {
|
||||
type: 'failed',
|
||||
@ -158,9 +159,8 @@ export abstract class TaskType extends EventEmitter implements ITask {
|
||||
};
|
||||
|
||||
this.logger?.error(`Task ${this.taskId} failed with error: ${error.message}`);
|
||||
this.emit('statusChange', this.status);
|
||||
}
|
||||
|
||||
this.emit('statusChange', this.status);
|
||||
} finally {
|
||||
this.fulfilledAt = new Date();
|
||||
const duration = this.fulfilledAt.getTime() - this.startedAt.getTime();
|
||||
|
Loading…
x
Reference in New Issue
Block a user