Skip to content

Commit 30ec1b0

Browse files
authored
Try restarting first for cases before processing payouts
1 parent 6f5a58f commit 30ec1b0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

payouts/payer.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ func (u *PayoutsProcessor) Start() {
6666
log.Println("Running with env RESOLVE_PAYOUT=1, now trying to resolve locked payouts")
6767
u.resolvePayouts()
6868
log.Println("Now you have to restart payouts module with RESOLVE_PAYOUT=0 for normal run")
69+
os.Exit(1)
6970
return
7071
}
7172

@@ -77,6 +78,7 @@ func (u *PayoutsProcessor) Start() {
7778
if len(payments) > 0 {
7879
log.Printf("Previous payout failed, you have to resolve it. List of failed payments:\n %v",
7980
formatPendingPayments(payments))
81+
os.Exit(1)
8082
return
8183
}
8284

@@ -88,6 +90,7 @@ func (u *PayoutsProcessor) Start() {
8890
}
8991
if locked {
9092
log.Println("Unable to start payouts because they are locked")
93+
os.Exit(1)
9194
return
9295
}
9396

0 commit comments

Comments
 (0)