aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb/pg_reserves_in_insert.c
diff options
context:
space:
mode:
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,