gnunet-svn
[Top][All Lists]
Advanced

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

[taler-cashless2ecash] branch master updated: fix: enhance logging


From: gnunet
Subject: [taler-cashless2ecash] branch master updated: fix: enhance logging
Date: Mon, 03 Jun 2024 17:07:59 +0200

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

joel-haeberli pushed a commit to branch master
in repository cashless2ecash.

The following commit(s) were added to refs/heads/master by this push:
     new f1d8cac  fix: enhance logging
f1d8cac is described below

commit f1d8cacb91336a023f0068da7823b3e5352ad287
Author: Joel-Haeberli <haebu@rubigen.ch>
AuthorDate: Mon Jun 3 17:07:56 2024 +0200

    fix: enhance logging
---
 c2ec/proc-transfer.go | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/c2ec/proc-transfer.go b/c2ec/proc-transfer.go
index dddcff5..9b281b1 100644
--- a/c2ec/proc-transfer.go
+++ b/c2ec/proc-transfer.go
@@ -41,7 +41,7 @@ func RunTransferrer(
                                LogInfo("proc-transfer", "transferrer executing 
transfers")
                                lastlog = time.Now()
                        }
-                       executePendingTransfers(errs)
+                       executePendingTransfers(errs, lastlog)
                }
        }()
 }
@@ -119,7 +119,7 @@ func transferCallback(notification *Notification, errs chan 
error) {
        }
 }
 
-func executePendingTransfers(errs chan error) {
+func executePendingTransfers(errs chan error, lastlog time.Time) {
 
        transfers, err := DB.GetTransfersByState(TRANSFER_STATUS_RETRY)
        if err != nil {
@@ -128,7 +128,9 @@ func executePendingTransfers(errs chan error) {
                return
        }
 
-       LogInfo("proc-transfer", fmt.Sprintf("found %d pending transfers", 
len(transfers)))
+       if lastlog.Before(time.Now().Add(time.Second * -30)) {
+               LogInfo("proc-transfer", fmt.Sprintf("found %d pending 
transfers", len(transfers)))
+       }
        for _, t := range transfers {
 
                shouldRetry := ShouldStartRetry(time.Unix(t.TransferTs, 0), 
int(t.Retries), MAX_TRANSFER_BACKOFF_MS)

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