Skip to content

Commit

Permalink
Disable payment check on the O's side (#3330)
Browse files Browse the repository at this point in the history
* Disable payment check on the O's side

We encounter "insufficient balance" error from time to time on prod. This needs investigation, but since we're not using public Os, let's temporarily not stop steams even if not enough payment

* Disable payment check on the O's side

We encounter "insufficient balance" error from time to time on prod. This needs investigation, but since we're not using public Os, let's temporarily not stop steams even if not enough payment
  • Loading branch information
leszko authored Dec 19, 2024
1 parent def7712 commit 5a756c4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
16 changes: 10 additions & 6 deletions server/ai_http.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,16 @@ func (h *lphttp) StartLiveVideoToVideo() http.Handler {
sessionID: mid,
})
if err != nil {
slog.Warn("Error accounting payment, stopping stream processing", "err", err)
pubCh.Close()
subCh.Close()
eventsCh.Close()
controlPubCh.Close()
cancel()
slog.Warn("Error accounting payment", "err", err)
// We encounter "insufficient balance" error from time to time on prod.
// This needs investigation, but since we're not using public Os,
// let's temporarily not stop steams even if not enough payment
//slog.Warn("Error accounting payment, stopping stream processing", "err", err)
//pubCh.Close()
//subCh.Close()
//eventsCh.Close()
//controlPubCh.Close()
//cancel()
}
return err
}
Expand Down
3 changes: 2 additions & 1 deletion server/live_payment_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ func (p *LivePaymentProcessor) processOne(timestamp time.Time) {
err := p.processSegmentFunc(int64(pixelsSinceLastProcessed))
if err != nil {
slog.Error("Error processing payment", "err", err)
return
// Temporarily ignore failing payments, because they are not critical while we're using our own Os
// return
}

p.lastProcessedMu.Lock()
Expand Down

0 comments on commit 5a756c4

Please sign in to comment.