gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] branch master updated: lock into the future, instead of


From: gnunet
Subject: [taler-exchange] branch master updated: lock into the future, instead of lock into past
Date: Tue, 24 May 2022 10:45:04 +0200

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

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new 8e71a7e4 lock into the future, instead of lock into past
8e71a7e4 is described below

commit 8e71a7e4de8c07767e8e11e745d9a7fc3bacc94f
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Tue May 24 10:45:01 2022 +0200

    lock into the future, instead of lock into past
---
 src/exchange/taler-exchange-wirewatch.c     | 22 ++++++++++++++++------
 src/exchangedb/plugin_exchangedb_postgres.c | 11 ++++++-----
 2 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/src/exchange/taler-exchange-wirewatch.c 
b/src/exchange/taler-exchange-wirewatch.c
index 85e73d1b..a1435627 100644
--- a/src/exchange/taler-exchange-wirewatch.c
+++ b/src/exchange/taler-exchange-wirewatch.c
@@ -417,12 +417,22 @@ schedule_transfers (struct WireAccount *wa)
     wa = wa_head;
     GNUNET_assert (NULL != wa);
   }
-  GNUNET_log (GNUNET_ERROR_TYPE_INFO,
-              "Will try to lock next shard of %s in %s\n",
-              wa->job_name,
-              GNUNET_STRINGS_relative_time_to_string (
-                GNUNET_TIME_absolute_get_remaining (wa->delayed_until),
-                GNUNET_YES));
+  if (shard_done)
+    GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+                "Will retry my shard (%llu,%llu] of %s in %s\n",
+                (unsigned long long) wa->shard_start,
+                (unsigned long long) wa->shard_end,
+                wa->job_name,
+                GNUNET_STRINGS_relative_time_to_string (
+                  GNUNET_TIME_absolute_get_remaining (wa->delayed_until),
+                  GNUNET_YES));
+  else
+    GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+                "Will try to lock next shard of %s in %s\n",
+                wa->job_name,
+                GNUNET_STRINGS_relative_time_to_string (
+                  GNUNET_TIME_absolute_get_remaining (wa->delayed_until),
+                  GNUNET_YES));
   GNUNET_assert (NULL == task);
   task = GNUNET_SCHEDULER_add_at (wa->delayed_until,
                                   &lock_shard,
diff --git a/src/exchangedb/plugin_exchangedb_postgres.c 
b/src/exchangedb/plugin_exchangedb_postgres.c
index 3ea6b97a..5924c9bf 100644
--- a/src/exchangedb/plugin_exchangedb_postgres.c
+++ b/src/exchangedb/plugin_exchangedb_postgres.c
@@ -12929,8 +12929,7 @@ postgres_begin_shard (void *cls,
         GNUNET_PQ_result_spec_end
       };
 
-      past = GNUNET_TIME_absolute_subtract (GNUNET_TIME_absolute_get (),
-                                            delay);
+      past = GNUNET_TIME_absolute_get ();
       qs = GNUNET_PQ_eval_prepared_singleton_select (pg->conn,
                                                      "get_open_shard",
                                                      params,
@@ -12956,7 +12955,8 @@ postgres_begin_shard (void *cls,
             GNUNET_PQ_query_param_end
           };
 
-          now = GNUNET_TIME_timestamp_get ();
+          now = GNUNET_TIME_absolute_to_timestamp (
+            GNUNET_TIME_relative_to_absolute (delay));
           qs = GNUNET_PQ_eval_prepared_non_select (pg->conn,
                                                    "reclaim_shard",
                                                    params);
@@ -13030,9 +13030,10 @@ postgres_begin_shard (void *cls,
         GNUNET_PQ_query_param_end
       };
 
-      now = GNUNET_TIME_timestamp_get ();
+      now = GNUNET_TIME_absolute_to_timestamp (
+        GNUNET_TIME_relative_to_absolute (delay));
       GNUNET_log (GNUNET_ERROR_TYPE_INFO,
-                  "Trying to claim shard %llu-%llu\n",
+                  "Trying to claim shard (%llu-%llu]\n",
                   (unsigned long long) *start_row,
                   (unsigned long long) *end_row);
       qs = GNUNET_PQ_eval_prepared_non_select (pg->conn,

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