[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] branch master updated: clean up webhook code a bit
From: |
gnunet |
Subject: |
[taler-merchant] branch master updated: clean up webhook code a bit |
Date: |
Fri, 05 Jan 2024 16:17:40 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new 026de1dd clean up webhook code a bit
026de1dd is described below
commit 026de1dda4cffbb973a2192a017974a487907a37
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Fri Jan 5 16:17:38 2024 +0100
clean up webhook code a bit
---
contrib/wallet-core | 2 +-
src/backend/taler-merchant-webhook.c | 29 +++++++++++++++--------------
2 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/contrib/wallet-core b/contrib/wallet-core
index 0c211082..a675c940 160000
--- a/contrib/wallet-core
+++ b/contrib/wallet-core
@@ -1 +1 @@
-Subproject commit 0c211082e0b8372f8fa1cef8102e477c7363d9ba
+Subproject commit a675c94085cfa90052c9ebacd2cebccfab2c4f18
diff --git a/src/backend/taler-merchant-webhook.c
b/src/backend/taler-merchant-webhook.c
index 99ab76d5..60ad3240 100644
--- a/src/backend/taler-merchant-webhook.c
+++ b/src/backend/taler-merchant-webhook.c
@@ -467,20 +467,9 @@ select_work (void *cls)
return;
case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS:
/* wait 5 min */
+ /* Note: this should not even be necessary if all webhooks
+ use the events properly... */
rel = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 5);
- if (NULL == eh)
- {
- struct GNUNET_DB_EventHeaderP es = {
- .size = htons (sizeof (es)),
- .type = htons (TALER_DBEVENT_MERCHANT_WEBHOOK_PENDING)
- };
-
- eh = db_plugin->event_listen (db_plugin->cls,
- &es,
- GNUNET_TIME_UNIT_FOREVER_REL,
- &db_notify,
- NULL);
- }
task = GNUNET_SCHEDULER_add_delayed (rel,
&select_work,
NULL);
@@ -493,7 +482,7 @@ select_work (void *cls)
}
-/*
+/**
* First task.
*
* @param cls closure, NULL
@@ -538,6 +527,18 @@ run (void *cls,
GNUNET_SCHEDULER_shutdown ();
return;
}
+ {
+ struct GNUNET_DB_EventHeaderP es = {
+ .size = htons (sizeof (es)),
+ .type = htons (TALER_DBEVENT_MERCHANT_WEBHOOK_PENDING)
+ };
+
+ eh = db_plugin->event_listen (db_plugin->cls,
+ &es,
+ GNUNET_TIME_UNIT_FOREVER_REL,
+ &db_notify,
+ NULL);
+ }
GNUNET_assert (NULL == task);
task = GNUNET_SCHEDULER_add_now (&select_work,
NULL);
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-merchant] branch master updated: clean up webhook code a bit,
gnunet <=