mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2024-11-19 09:54:30 +01:00
reduce payout processor logs
This commit is contained in:
parent
382fe5cd47
commit
e60e8dc9ba
@ -46,25 +46,21 @@ public abstract class BaseAutomatedPayoutProcessor<T> : BaseAsyncService where T
|
|||||||
|
|
||||||
private async Task Act()
|
private async Task Act()
|
||||||
{
|
{
|
||||||
Logs.PayServer.LogInformation($"Starting to process");
|
|
||||||
var store = await _storeRepository.FindStore(_PayoutProcesserSettings.StoreId);
|
var store = await _storeRepository.FindStore(_PayoutProcesserSettings.StoreId);
|
||||||
var paymentMethod = store?.GetEnabledPaymentMethods(_btcPayNetworkProvider)?.FirstOrDefault(
|
var paymentMethod = store?.GetEnabledPaymentMethods(_btcPayNetworkProvider)?.FirstOrDefault(
|
||||||
method =>
|
method =>
|
||||||
method.PaymentId == PaymentMethodId);
|
method.PaymentId == PaymentMethodId);
|
||||||
|
|
||||||
|
var blob = GetBlob(_PayoutProcesserSettings);
|
||||||
if (paymentMethod is not null)
|
if (paymentMethod is not null)
|
||||||
{
|
{
|
||||||
var payouts = await GetRelevantPayouts();
|
var payouts = await GetRelevantPayouts();
|
||||||
Logs.PayServer.LogInformation($"{payouts.Length} found to process");
|
if (payouts.Length > 0)
|
||||||
await Process(paymentMethod, payouts);
|
{
|
||||||
|
Logs.PayServer.LogInformation($"{payouts.Length} found to process. Starting (and after will sleep for {blob.Interval})");
|
||||||
|
await Process(paymentMethod, payouts);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
Logs.PayServer.LogInformation($"Payment method not configured.");
|
|
||||||
}
|
|
||||||
|
|
||||||
var blob = GetBlob(_PayoutProcesserSettings);
|
|
||||||
|
|
||||||
Logs.PayServer.LogInformation($"Sleeping for {blob.Interval}");
|
|
||||||
await Task.Delay(blob.Interval, CancellationToken);
|
await Task.Delay(blob.Interval, CancellationToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user