From 076af94327b385d149ca10dd0322ddbbd16fbe94 Mon Sep 17 00:00:00 2001 From: golobitch Date: Wed, 31 Jul 2024 22:07:28 +0200 Subject: [PATCH] feat(config): backend to introduce env variables for actionable incoming payments Introduced three new env variables that will set the behaviour of actionable incoming payments. One env variable will define if polling will be done, meaning that it will wait for the incoming payment to be accepted or rejected, and other two env variables defines timeout for polling and polling frequency --- packages/backend/src/config/app.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/config/app.ts b/packages/backend/src/config/app.ts index a2a77684c8..6e697d194d 100644 --- a/packages/backend/src/config/app.ts +++ b/packages/backend/src/config/app.ts @@ -132,7 +132,10 @@ export const Config = { incomingPaymentWorkers: envInt('INCOMING_PAYMENT_WORKERS', 1), incomingPaymentWorkerIdle: envInt('INCOMING_PAYMENT_WORKER_IDLE', 200), // milliseconds - + poolIncomingPaymentCreatedWebhook: envBool('POLL_INCOMING_PAYMENT_CREATED_WEBHOOK', false), + incomingPaymentCreatedPoolTimeout: envInt('INCOMING_PAYMENT_CREATED_POLL_TIMEOUT_MS', 10000), // milliseconds + incomingPaymentCreatedPoolFrequence: envInt('INCOMING_PAYMENT_CREATED_POLL_FREQUENCY_MS', 1000), // milliseconds + webhookWorkers: envInt('WEBHOOK_WORKERS', 1), webhookWorkerIdle: envInt('WEBHOOK_WORKER_IDLE', 200), // milliseconds webhookUrl: envString('WEBHOOK_URL'),