Skip to content

Commit

Permalink
Code Review - Behavior of FixedRate and FixedDelay should be similar …
Browse files Browse the repository at this point in the history
…in TasksRunnerService
  • Loading branch information
Guozhang Wu committed Jul 4, 2023
1 parent b573574 commit 36f2038
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ public void setTerminationTopicName(String terminationTopicName) {
public void scheduleAtFixedRate(ScheduledAtFixedRateParameters params) {
long start = System.nanoTime();
executeRunnable(params, false);
if (!redisson.getMap(tasksName, StringCodec.INSTANCE).containsKey(params.getRequestId())) {
return;
}

long spent = params.getSpentTime()
+ TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - start);

Expand Down

0 comments on commit 36f2038

Please sign in to comment.