aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb/pg_reserves_in_insert.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-02-05 21:59:41 +0100
committerChristian Grothoff <christian@grothoff.org>2023-02-05 21:59:41 +0100
commit6d3efbe900ed47f2ce501d795bf4a0dd186d1b91 (patch)
tree5dd8f2ff2d26e3050f1df1da2cf80abe93690324 /src/exchangedb/pg_reserves_in_insert.c
parentf079cff4ae81ee2a6a522326cfecabaed49efd5b (diff)
downloadexchange-6d3efbe900ed47f2ce501d795bf4a0dd186d1b91.tar.xz
-debugging batch reserves_in notification logic: success: pg_notify does not work, identifier vs. string
Diffstat (limited to 'src/exchangedb/pg_reserves_in_insert.c')
-rw-r--r--src/exchangedb/pg_reserves_in_insert.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/exchangedb/pg_reserves_in_insert.c b/src/exchangedb/pg_reserves_in_insert.c
index 2db7e4a47..ac14cb567 100644
--- a/src/exchangedb/pg_reserves_in_insert.c
+++ b/src/exchangedb/pg_reserves_in_insert.c
@@ -54,6 +54,25 @@ compute_notify_on_reserve (const struct TALER_ReservePublicKeyP *reserve_pub)
}
+static void
+notify_on_reserve (struct PostgresClosure *pg,
+ const struct TALER_ReservePublicKeyP *reserve_pub)
+{
+ struct TALER_ReserveEventP rep = {
+ .header.size = htons (sizeof (rep)),
+ .header.type = htons (TALER_DBEVENT_EXCHANGE_RESERVE_INCOMING),
+ .reserve_pub = *reserve_pub
+ };
+
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Notifying on reserve!\n");
+ TEH_PG_event_notify (pg,
+ &rep.header,
+ NULL,
+ 0);
+}
+
+
static enum GNUNET_DB_QueryStatus
insert1 (struct PostgresClosure *pg,
const struct TALER_EXCHANGEDB_ReserveInInfo reserves[1],
@@ -689,6 +708,7 @@ TEH_PG_reserves_in_insert (void *cls,
{
unsigned int bs = GNUNET_MIN (batch_size,
reserves_length - i);
+ bs = 1; // FIXME-JOSEPH: for now, until pg_notify is gone!
if (bs >= 8)
{
qs1 = insert8 (pg,