Skip to content

Commit

Permalink
added debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
phoebe-canva committed Apr 5, 2023
1 parent f212170 commit 0ebe2a4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/component/output/async_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,16 @@ func (w *AsyncWriter) loop() {
for {
var ts message.Transaction
var open bool
w.log.Tracef("I have entered the transaction here\n")
select {
case ts, open = <-w.transactions:
if !open {
w.log.Tracef("Transaction channel is not open. Returning..\n")
return
}
w.log.Tracef("Safely continue and transfer the transactions\n")
case <-w.shutSig.CloseAtLeisureChan():
w.log.Tracef("Shutdown at leisure has been triggered. Returning\n")
return
}

Expand Down

0 comments on commit 0ebe2a4

Please sign in to comment.