commit fcfd5497b88399fa7c6f74e61c868b2e9b947ecf
parent 7477ca4281127d9aea06418df72c43fe9f43cc2c
Author: MS <ms@taler.net>
Date: Wed, 8 Nov 2023 09:30:49 +0100
nexus submit
allowing --transient to run without checking the FREQUENCY
configuration value
Diffstat:
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsSubmit.kt b/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsSubmit.kt
@@ -258,11 +258,6 @@ class EbicsSubmit : CliktCommand("Submits any initiated payment found in the dat
}
// Fail now if keying is incomplete.
if (!isKeyingComplete(cfg)) exitProcess(1)
- val frequency: NexusFrequency = doOrFail {
- val configValue = cfg.config.requireString("nexus-submit", "frequency")
- val frequencySeconds = checkFrequency(configValue)
- return@doOrFail NexusFrequency(frequencySeconds, configValue)
- }
val dbCfg = cfg.config.extractDbConfigOrFail()
val db = Database(dbCfg.dbConnStr)
val httpClient = HttpClient()
@@ -281,6 +276,11 @@ class EbicsSubmit : CliktCommand("Submits any initiated payment found in the dat
submitBatch(cfg, db, httpClient, clientKeys, bankKeys)
return
}
+ val frequency: NexusFrequency = doOrFail {
+ val configValue = cfg.config.requireString("nexus-submit", "frequency")
+ val frequencySeconds = checkFrequency(configValue)
+ return@doOrFail NexusFrequency(frequencySeconds, configValue)
+ }
logger.debug("Running with a frequency of ${frequency.fromConfig}")
if (frequency.inSeconds == 0) {
logger.warn("Long-polling not implemented, running therefore in transient mode")