Merge remote-tracking branch 'origin/master' into release/1.0.1

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-07-05 20:01:24 +02:00
193 changed files with 16701 additions and 4702 deletions

View File

@@ -4,6 +4,7 @@ import { v4 as uuid } from 'uuid';
import config from '@/config';
import type { Role } from '@db/entities/Role';
import { RoleRepository, SettingsRepository, UserRepository } from '@db/repositories';
import { ActiveWorkflowRunner } from '@/ActiveWorkflowRunner';
import { hashPassword } from '@/UserManagement/UserManagementHelper';
import { eventBus } from '@/eventbus/MessageEventBus/MessageEventBus';
import { License } from '@/License';
@@ -66,6 +67,7 @@ export class E2EController {
private roleRepo: RoleRepository,
private settingsRepo: SettingsRepository,
private userRepo: UserRepository,
private workflowRunner: ActiveWorkflowRunner,
) {
license.isFeatureEnabled = (feature: LICENSE_FEATURES) =>
this.enabledFeatures[feature] ?? false;
@@ -76,6 +78,7 @@ export class E2EController {
config.set('ui.banners.v1.dismissed', true);
this.resetFeatures();
await this.resetLogStreaming();
await this.removeActiveWorkflows();
await this.truncateAll();
await this.setupUserManagement(req.body.owner, req.body.members);
}
@@ -92,6 +95,11 @@ export class E2EController {
}
}
private async removeActiveWorkflows() {
this.workflowRunner.removeAllQueuedWorkflowActivations();
await this.workflowRunner.removeAll();
}
private async resetLogStreaming() {
for (const id in eventBus.destinations) {
await eventBus.removeDestination(id);