fix(core): Flush instance stopped event immediately (#10238)
This commit is contained in:
@@ -282,7 +282,7 @@ export class WorkflowService {
|
||||
await this.workflowRepository.delete(workflowId);
|
||||
await this.binaryDataService.deleteMany(idsForDeletion);
|
||||
|
||||
void Container.get(InternalHooks).onWorkflowDeleted(user, workflowId, false);
|
||||
Container.get(InternalHooks).onWorkflowDeleted(user, workflowId, false);
|
||||
this.eventService.emit('workflow-deleted', { user, workflowId });
|
||||
await this.externalHooks.run('workflow.afterDelete', [workflowId]);
|
||||
|
||||
|
||||
@@ -179,7 +179,7 @@ export class WorkflowsController {
|
||||
delete savedWorkflowWithMetaData.shared;
|
||||
|
||||
await this.externalHooks.run('workflow.afterCreate', [savedWorkflow]);
|
||||
void this.internalHooks.onWorkflowCreated(req.user, newWorkflow, project!, false);
|
||||
this.internalHooks.onWorkflowCreated(req.user, newWorkflow, project!, false);
|
||||
this.eventService.emit('workflow-created', { user: req.user, workflow: newWorkflow });
|
||||
|
||||
const scopes = await this.workflowService.getWorkflowScopes(req.user, savedWorkflow.id);
|
||||
@@ -454,7 +454,7 @@ export class WorkflowsController {
|
||||
newShareeIds = toShare;
|
||||
});
|
||||
|
||||
void this.internalHooks.onWorkflowSharingUpdate(workflowId, req.user.id, shareWithIds);
|
||||
this.internalHooks.onWorkflowSharingUpdate(workflowId, req.user.id, shareWithIds);
|
||||
|
||||
const projectsRelations = await this.projectRelationRepository.findBy({
|
||||
projectId: In(newShareeIds),
|
||||
|
||||
Reference in New Issue
Block a user