summaryrefslogtreecommitdiff
path: root/nexus
diff options
context:
space:
mode:
authorMS <ms@taler.net>2021-01-12 15:40:37 +0100
committerMS <ms@taler.net>2021-01-29 10:55:58 +0100
commit536720d058dd267c32b5e386e393dbbe78e40a0d (patch)
treebc2e777f1b199fb48a375a271c2e1b2677a58b25 /nexus
parent0007b25ceb408617ffcdbb2a40828e51d601dc73 (diff)
downloadlibeufin-536720d058dd267c32b5e386e393dbbe78e40a0d.tar.gz
libeufin-536720d058dd267c32b5e386e393dbbe78e40a0d.tar.bz2
libeufin-536720d058dd267c32b5e386e393dbbe78e40a0d.zip
debugging
Diffstat (limited to 'nexus')
-rw-r--r--nexus/src/main/kotlin/tech/libeufin/nexus/Scheduling.kt5
1 files changed, 2 insertions, 3 deletions
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/Scheduling.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/Scheduling.kt
index 8eff8790..468947a5 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/Scheduling.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/Scheduling.kt
@@ -101,7 +101,6 @@ object NexusCron {
fun startOperationScheduler(httpClient: HttpClient) {
GlobalScope.launch {
while (true) {
- logger.trace("running schedule loop")
// First, assign next execution time stamps to all tasks that need them
transaction {
NexusScheduledTaskEntity.find {
@@ -123,6 +122,7 @@ fun startOperationScheduler(httpClient: HttpClient) {
val nowSec = getNow().toEpochSecond()
// Second, find tasks that are due
+ logger.debug("nowSec: $nowSec")
val dueTasks = transaction {
NexusScheduledTaskEntity.find {
NexusScheduledTasksTable.nextScheduledExecutionSec lessEq nowSec
@@ -130,7 +130,6 @@ fun startOperationScheduler(httpClient: HttpClient) {
TaskSchedule(it.id.value, it.taskName, it.taskType, it.resourceType, it.resourceId, it.taskParams)
}
}
-
// Execute those due tasks
dueTasks.forEach {
runTask(httpClient, it)
@@ -147,4 +146,4 @@ fun startOperationScheduler(httpClient: HttpClient) {
delay(Duration.ofMillis(tick))
}
}
-}
+} \ No newline at end of file