mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-01-19 05:33:31 +01:00
Automated payout processors shouldn't spam logs on shutdown (Fix #4193)
This commit is contained in:
parent
68cdd2c2c8
commit
1732606581
@ -14,6 +14,8 @@ namespace BTCPayServer.HostedServices
|
||||
protected Task[] _Tasks;
|
||||
public readonly Logs Logs;
|
||||
|
||||
public bool NoLogsOnExit { get; set; }
|
||||
|
||||
protected BaseAsyncService(Logs logs)
|
||||
{
|
||||
Logs = logs;
|
||||
@ -77,7 +79,8 @@ namespace BTCPayServer.HostedServices
|
||||
if (_Tasks != null)
|
||||
await Task.WhenAll(_Tasks);
|
||||
}
|
||||
Logs.PayServer.LogInformation($"{this.GetType().Name} successfully exited...");
|
||||
if (!NoLogsOnExit)
|
||||
Logs.PayServer.LogInformation($"{this.GetType().Name} successfully exited...");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -40,6 +40,7 @@ public abstract class BaseAutomatedPayoutProcessor<T> : BaseAsyncService where T
|
||||
_applicationDbContextFactory = applicationDbContextFactory;
|
||||
_pullPaymentHostedService = pullPaymentHostedService;
|
||||
_btcPayNetworkProvider = btcPayNetworkProvider;
|
||||
this.NoLogsOnExit = true;
|
||||
}
|
||||
|
||||
internal override Task[] InitializeTasks()
|
||||
|
Loading…
Reference in New Issue
Block a user