Skip to content

Commit

Permalink
Tighten mode check
Browse files Browse the repository at this point in the history
  • Loading branch information
ivov committed Feb 11, 2025
1 parent 927ed75 commit e0bad18
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/cli/src/__tests__/active-workflow-manager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ describe('ActiveWorkflowManager', () => {
});

describe('add', () => {
test('should skip inactive workflow', async () => {
test('should skip inactive workflow in `init` activation mode', async () => {
const checkSpy = jest.spyOn(activeWorkflowManager, 'checkIfWorkflowCanBeActivated');
const addWebhooksSpy = jest.spyOn(activeWorkflowManager, 'addWebhooks');
const addTriggersAndPollersSpy = jest.spyOn(activeWorkflowManager, 'addTriggersAndPollers');
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/active-workflow-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ export class ActiveWorkflowManager {
});
}

if (!dbWorkflow.active) {
if (['init', 'leadershipChange'].includes(activationMode) && !dbWorkflow.active) {
this.logger.debug(`Skipping workflow ${dbWorkflow.display()} as it is no longer active`, {
workflowId: dbWorkflow.id,
});
Expand Down

0 comments on commit e0bad18

Please sign in to comment.