mirror of
https://github.com/getAlby/lndhub.go.git
synced 2026-02-23 05:44:23 +01:00
move log line
This commit is contained in:
@@ -75,6 +75,9 @@ func main() {
|
||||
//for this job, we only search for payments older than a day to avoid current in-flight payments
|
||||
ts := time.Now().Add(-1 * 24 * time.Hour)
|
||||
pending, err := svc.GetPendingPaymentsUntil(startupCtx, ts)
|
||||
svc.Logger.Infof("Found %d pending payments", len(pending))
|
||||
startupCtx, cancel := context.WithTimeout(startupCtx, 2*time.Minute)
|
||||
defer cancel()
|
||||
err = svc.CheckPendingOutgoingPayments(startupCtx, pending)
|
||||
if err != nil {
|
||||
sentry.CaptureException(err)
|
||||
|
||||
@@ -31,6 +31,7 @@ func (svc *LndhubService) StartPendingPaymentRoutine(ctx context.Context) (err e
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
svc.Logger.Infof("Found %d pending payments", len(pending))
|
||||
return svc.CheckPendingOutgoingPayments(ctx, pending)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,6 @@ func (svc *LndhubService) GetAllPendingPayments(ctx context.Context) ([]models.I
|
||||
return payments, err
|
||||
}
|
||||
func (svc *LndhubService) CheckPendingOutgoingPayments(ctx context.Context, pendingPayments []models.Invoice) (err error) {
|
||||
svc.Logger.Infof("Found %d pending payments", len(pendingPayments))
|
||||
//call trackoutgoingpaymentstatus for each one
|
||||
var wg sync.WaitGroup
|
||||
for _, inv := range pendingPayments {
|
||||
|
||||
Reference in New Issue
Block a user