This commit is contained in:
Christian Grothoff 2023-06-23 11:41:52 +02:00
parent 720783b66a
commit d25dc8b0ad
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
8 changed files with 27 additions and 4 deletions

View File

@ -147,6 +147,10 @@ kyc_aml_finished (void *cls,
ea, ea,
0 != code); 0 != code);
GNUNET_free (ea); GNUNET_free (ea);
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Stored encrypted KYC process #%llu attributes: %d\n",
(unsigned long long) kat->process_row,
qs);
if (GNUNET_DB_STATUS_HARD_ERROR == qs) if (GNUNET_DB_STATUS_HARD_ERROR == qs)
{ {
GNUNET_break (0); GNUNET_break (0);

View File

@ -601,11 +601,12 @@ TEH_handler_kyc_check (
{ {
GNUNET_log (GNUNET_ERROR_TYPE_INFO, GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Suspending HTTP request on timeout (%s) now...\n", "Suspending HTTP request on timeout (%s) now...\n",
GNUNET_TIME_relative2s (GNUNET_TIME_absolute_get_duration ( GNUNET_TIME_relative2s (GNUNET_TIME_absolute_get_remaining (
kyp->timeout), kyp->timeout),
true)); true));
GNUNET_assert (NULL != kyp->eh); GNUNET_assert (NULL != kyp->eh);
kyp->suspended = true; kyp->suspended = true;
kyp->section_name = NULL;
GNUNET_CONTAINER_DLL_insert (kyp_head, GNUNET_CONTAINER_DLL_insert (kyp_head,
kyp_tail, kyp_tail,
kyp); kyp);

View File

@ -221,6 +221,9 @@ proof_cb (
&old_scope); &old_scope);
if (TALER_KYCLOGIC_STATUS_SUCCESS == status) if (TALER_KYCLOGIC_STATUS_SUCCESS == status)
{ {
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"KYC process #%llu succeeded with KYC provider\n",
(unsigned long long) kpc->process_row);
kpc->kat = TEH_kyc_finished (&rc->async_scope_id, kpc->kat = TEH_kyc_finished (&rc->async_scope_id,
kpc->process_row, kpc->process_row,
&kpc->h_payto, &kpc->h_payto,

View File

@ -65,7 +65,9 @@ BEGIN
,expiration_date=GREATEST(expiration_date,in_expiration_date) ,expiration_date=GREATEST(expiration_date,in_expiration_date)
,gc_date=GREATEST(gc_date,in_expiration_date) ,gc_date=GREATEST(gc_date,in_expiration_date)
WHERE reserve_pub=in_reserve_pub; WHERE reserve_pub=in_reserve_pub;
PERFORM pg_notify(in_notify, NULL); EXECUTE FORMAT (
'NOTIFY %s'
in_notify);
ELSE ELSE
out_duplicate = TRUE; out_duplicate = TRUE;
END IF; END IF;

View File

@ -75,8 +75,10 @@ THEN
UPDATE SET status=EXCLUDED.status | 1; UPDATE SET status=EXCLUDED.status | 1;
END IF; END IF;
-- Wake up everyone who might care... EXECUTE FORMAT (
PERFORM pg_notify (in_kyc_completed_notify_s, NULL); 'NOTIFY %s'
,in_kyc_completed_notify_s);
INSERT INTO kyc_alerts INSERT INTO kyc_alerts
(h_payto (h_payto

View File

@ -89,6 +89,7 @@ TEH_PG_insert_aml_decision (
params, params,
rs); rs);
GNUNET_free (notify_s); GNUNET_free (notify_s);
GNUNET_PQ_event_do_poll (pg->conn);
if (NULL != kyc_s) if (NULL != kyc_s)
free (kyc_s); free (kyc_s);
return qs; return qs;

View File

@ -25,6 +25,9 @@
#include "pg_insert_kyc_attributes.h" #include "pg_insert_kyc_attributes.h"
#include "pg_helper.h" #include "pg_helper.h"
void
event_do_poll (struct GNUNET_PQ_Context *db);
enum GNUNET_DB_QueryStatus enum GNUNET_DB_QueryStatus
TEH_PG_insert_kyc_attributes ( TEH_PG_insert_kyc_attributes (
@ -81,6 +84,9 @@ TEH_PG_insert_kyc_attributes (
}; };
enum GNUNET_DB_QueryStatus qs; enum GNUNET_DB_QueryStatus qs;
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Inserting KYC attributes, wake up on %s\n",
kyc_completed_notify_s);
PREPARE (pg, PREPARE (pg,
"insert_kyc_attributes", "insert_kyc_attributes",
"SELECT " "SELECT "
@ -92,6 +98,8 @@ TEH_PG_insert_kyc_attributes (
params, params,
rs); rs);
GNUNET_free (kyc_completed_notify_s); GNUNET_free (kyc_completed_notify_s);
GNUNET_PQ_event_do_poll (pg->conn);
if (qs < 0) if (qs < 0)
return qs; return qs;
if (! ok) if (! ok)

View File

@ -611,6 +611,7 @@ TEH_PG_reserves_in_insert (
reserves_length, reserves_length,
batch_size, batch_size,
results); results);
GNUNET_PQ_event_do_poll (pg->conn);
for (unsigned int i = 0; i<reserves_length; i++) for (unsigned int i = 0; i<reserves_length; i++)
GNUNET_free (rrs[i].notify_s); GNUNET_free (rrs[i].notify_s);
return qs; return qs;
@ -889,6 +890,7 @@ TEH_PG_reserves_in_insertN (
} }
} }
finished: finished:
GNUNET_PQ_event_do_poll (pg->conn);
for (unsigned int i = 0; i<reserves_length; i++) for (unsigned int i = 0; i<reserves_length; i++)
GNUNET_free (rrs[i].notify_s); GNUNET_free (rrs[i].notify_s);
return qs; return qs;