gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libeufin] branch master updated: implementing ebics-submit --transient


From: gnunet
Subject: [libeufin] branch master updated: implementing ebics-submit --transient flag
Date: Tue, 31 Oct 2023 14:16:54 +0100

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new 62624453 implementing ebics-submit --transient flag
62624453 is described below

commit 626244533fe50ca49675673951e19ead34af349c
Author: MS <ms@taler.net>
AuthorDate: Tue Oct 31 14:16:15 2023 +0100

    implementing ebics-submit --transient flag
---
 nexus/src/main/kotlin/tech/libeufin/nexus/EbicsSubmit.kt | 12 ++++++++++++
 util/src/main/kotlin/ebics_h004/EbicsRequest.kt          |  2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsSubmit.kt 
b/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsSubmit.kt
index 51190a4f..36cce2a1 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsSubmit.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsSubmit.kt
@@ -20,6 +20,7 @@
 package tech.libeufin.nexus
 
 import com.github.ajalt.clikt.core.CliktCommand
+import com.github.ajalt.clikt.parameters.options.flag
 import com.github.ajalt.clikt.parameters.options.option
 import io.ktor.client.*
 import kotlinx.coroutines.runBlocking
@@ -168,6 +169,12 @@ class EbicsSubmit : CliktCommand("Submits any initiated 
payment found in the dat
         "--config", "-c",
         help = "set the configuration file"
     )
+    private val transient by option(
+        "--transient",
+        help = "This flag submits what is found in the database and returns, " 
+
+                "ignoring the 'frequency' value found in the configuration"
+    ).flag(default = true)
+
     /**
      * Submits any initiated payment that was not submitted
      * so far and -- according to the configuration -- returns
@@ -192,6 +199,11 @@ class EbicsSubmit : CliktCommand("Submits any initiated 
payment found in the dat
             logger.error("Client private keys not found at: 
${cfg.clientPrivateKeysFilename}")
             exitProcess(1)
         }
+        if (transient) {
+            logger.info("Transient mode: submitting what found and returning.")
+            submitBatch(cfg, db, httpClient, clientKeys, bankKeys)
+            return
+        }
         if (frequency == 0) {
             logger.warn("Long-polling not implemented, submitting what is 
found and exit")
             submitBatch(cfg, db, httpClient, clientKeys, bankKeys)
diff --git a/util/src/main/kotlin/ebics_h004/EbicsRequest.kt 
b/util/src/main/kotlin/ebics_h004/EbicsRequest.kt
index 2b7dc72e..e221a502 100644
--- a/util/src/main/kotlin/ebics_h004/EbicsRequest.kt
+++ b/util/src/main/kotlin/ebics_h004/EbicsRequest.kt
@@ -160,7 +160,7 @@ class EbicsRequest {
         lateinit var orderType: String
 
         /**
-         * Only present if this ebicsRequest is a upload order
+         * Only present if this ebicsRequest is an upload order
          * relating to an already existing order.
          */
         @get:XmlElement(name = "OrderID", required = true)

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]