Skip to content

Commit 977e941

Browse files
committed
Minor reordering
1 parent c10ed78 commit 977e941

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • ghost/core/core/server/services/automations

ghost/core/core/server/services/automations/poll.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,13 @@ const processStep = async ({
6868
}: Readonly<PollOptions & {
6969
step: AutomationStepToRun;
7070
}>): Promise<void> => {
71-
if (step.step_attempts > MAX_ATTEMPTS) {
72-
await markMaxAttemptsExceeded(automationsApi, step);
71+
if (step.automation_status !== 'active') {
72+
await automationsApi.markStepTerminal(step, 'automation disabled');
7373
return;
7474
}
7575

76-
if (step.automation_status !== 'active') {
77-
await automationsApi.markStepTerminal(step, 'automation disabled');
76+
if (step.step_attempts > MAX_ATTEMPTS) {
77+
await markMaxAttemptsExceeded(automationsApi, step);
7878
return;
7979
}
8080

0 commit comments

Comments
 (0)