Skip to content

Commit

Permalink
Mark cleanup items
Browse files Browse the repository at this point in the history
  • Loading branch information
ivov committed Feb 1, 2024
1 parent aa8a3d0 commit 0cfc9f0
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/cli/src/ActiveWebhooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class ActiveWebhooks implements IWebhookManager {
const httpMethod = request.method;
const path = request.params.path;

this.logger.warn(`Received webhook "${httpMethod}" for path "${path}"`);
this.logger.warn(`Received webhook "${httpMethod}" for path "${path}"`); // @pending: restore debug

// Reset request parameters
request.params = {} as WebhookRequest['params'];
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/ActiveWorkflowRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ export class ActiveWorkflowRunner {
);

if (workflow.getTriggerNodes().length !== 0 || workflow.getPollNodes().length !== 0) {
this.logger.warn(`Adding triggers and pollers for workflow ${dbWorkflow.display()}`);
this.logger.warn(`Adding triggers and pollers for workflow ${dbWorkflow.display()}`); // @pending: restore debug

await this.activeWorkflows.add(
workflow.id,
Expand Down
8 changes: 2 additions & 6 deletions packages/cli/src/services/orchestration.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ export class OrchestrationService {
);
}

get isSingleMainEnabled() {
return !this.isMultiMainSetupEnabled;
}

redisPublisher: RedisServicePubSubPublisher;

get instanceId() {
Expand Down Expand Up @@ -133,13 +129,13 @@ export class OrchestrationService {
* Whether this instance may add webhooks to the `webhook_entity` table.
*/
shouldAddWebhooks(activationMode: WorkflowActivateMode) {
if (inTest) return true;
if (inTest) return true; // @pending: remove this

if (activationMode === 'init') return false;

if (activationMode === 'leadershipChange') return false;

return this.isLeader; // manual activation
return this.isLeader; // 'update' or 'activate'
}

/**
Expand Down
1 change: 1 addition & 0 deletions packages/cli/test/integration/shared/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export { setupTestServer } from './testServer';
* Initialize node types.
*/
export async function initActiveWorkflowRunner(mockOrchestrationService = true) {
// @pending: remove arg
if (mockOrchestrationService) mockInstance(OrchestrationService);
mockInstance(Push);
mockInstance(ExecutionService);
Expand Down

0 comments on commit 0cfc9f0

Please sign in to comment.