Run jobs before delay

This commit is contained in:
William Brawner 2021-09-15 18:54:43 -06:00
parent a9611eee23
commit 9446b52e3d

View file

@ -138,8 +138,8 @@ fun Application.moduleWithDependencies(
RecurringTransactionProcessingJob(recurringTransactionRepository, transactionRepository) RecurringTransactionProcessingJob(recurringTransactionRepository, transactionRepository)
) )
while (currentCoroutineContext().isActive) { while (currentCoroutineContext().isActive) {
delay(Duration.hours(24))
jobs.forEach { it.run() } jobs.forEach { it.run() }
delay(Duration.hours(24))
} }
} }
} }