gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated (73b6118 -> 0e0cc55)


From: gnunet
Subject: [libeufin] branch master updated (73b6118 -> 0e0cc55)
Date: Sat, 13 Jun 2020 10:13:30 +0200

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

dold pushed a change to branch master
in repository libeufin.

    from 73b6118  improve camt modeling/parsing
     new e5321b2  fix resource leak
     new 0e0cc55  pass through type correctly

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt 
b/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
index dc811d8..17f4519 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/Main.kt
@@ -260,14 +260,14 @@ fun ApplicationRequest.hasBody(): Boolean {
     return false
 }
 
-fun moreFrequentBackgroundTasks() {
+fun moreFrequentBackgroundTasks(httpClient: HttpClient) {
     GlobalScope.launch {
         while (true) {
             logger.debug("More frequent background job")
             ingestTalerTransactions()
             submitPreparedPaymentsViaEbics()
             try {
-                downloadTalerFacadesTransactions("C52")
+                downloadTalerFacadesTransactions(httpClient,"C52")
             } catch (e: Exception) {
                 val sw = StringWriter()
                 val pw = PrintWriter(sw)
@@ -279,12 +279,12 @@ fun moreFrequentBackgroundTasks() {
     }
 }
 
-fun lessFrequentBackgroundTasks() {
+fun lessFrequentBackgroundTasks(httpClient: HttpClient) {
     GlobalScope.launch {
         while (true) {
             logger.debug("Less frequent background job")
             try {
-                downloadTalerFacadesTransactions("C53")
+                downloadTalerFacadesTransactions(httpClient,"C53")
             } catch (e: Exception) {
                 val sw = StringWriter()
                 val pw = PrintWriter(sw)
@@ -297,8 +297,7 @@ fun lessFrequentBackgroundTasks() {
 }
 
 /** Crawls all the facades, and requests history for each of its creators. */
-suspend fun downloadTalerFacadesTransactions(type: String) {
-    val httpClient = HttpClient()
+suspend fun downloadTalerFacadesTransactions(httpClient: HttpClient, type: 
String) {
     val work = mutableListOf<Pair<String, String>>()
     transaction {
         TalerFacadeStateEntity.all().forEach {
@@ -361,7 +360,7 @@ suspend fun fetchTransactionsInternal(
     when (res.connectionType) {
         "ebics" -> {
             fetchEbicsC5x(
-                "C53",
+                type,
                 client,
                 res.connectionName,
                 ct.start,
@@ -449,8 +448,8 @@ fun serverMain(dbName: String) {
             return@intercept
         }
 
-        lessFrequentBackgroundTasks()
-        moreFrequentBackgroundTasks()
+        lessFrequentBackgroundTasks(client)
+        moreFrequentBackgroundTasks(client)
         routing {
             /**
              * Shows information about the requesting user.

-- 
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]