Skip to content

Commit

Permalink
fix: only exclude actual 'run once' jobs from scheduler main list [DH…
Browse files Browse the repository at this point in the history
…IS2-16074] (#15494)
  • Loading branch information
jbee authored Oct 26, 2023
1 parent 90f5d0f commit 220774a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,10 @@ public boolean isUsedInQueue() {
}

public boolean isRunOnce() {
return cronExpression == null && delay == null && queueName == null;
return schedulingType == SchedulingType.ONCE_ASAP
&& cronExpression == null
&& delay == null
&& queueName == null;
}

public boolean isDueBetween(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,9 @@ void testDeleteQueue() {

assertStatus(HttpStatus.NO_CONTENT, DELETE("/scheduler/queues/testQueue"));
assertStatus(HttpStatus.NOT_FOUND, GET("/scheduler/queues/testQueue"));
// verify the ex-queue jobs show in the scheduler main list again
JsonArray list = GET("/scheduler").content();
assertEquals(3, list.size());
}

@Test
Expand Down

0 comments on commit 220774a

Please sign in to comment.