Skip to content

Commit

Permalink
Fix cleantime instant, it == now minus 3 sconds
Browse files Browse the repository at this point in the history
  • Loading branch information
lenguyenthanh committed Dec 1, 2023
1 parent 43aa0b8 commit 65ca816
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/src/main/scala/Jobs.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ object WorkCleaningJob:
def run(): IO[Unit] =
Logger[IO].info("Start cleaning job") *>
IO.sleep(5.seconds) *>
(IO.realTimeInstant.flatMap(executor.clean) *> IO.sleep(3.seconds)).foreverM
(IO.realTimeInstant.flatMap(now => executor.clean(now.minusSeconds(3))) *>
IO.sleep(3.seconds)).foreverM

0 comments on commit 65ca816

Please sign in to comment.