Skip to content
This repository has been archived by the owner on Apr 5, 2023. It is now read-only.

Commit

Permalink
Merge pull request #40 from pipefy/ms-main/feature/flush-log
Browse files Browse the repository at this point in the history
🔊 Force flushing logs after processing a message
  • Loading branch information
mhshiba authored Aug 23, 2022
2 parents be54b8e + 4520479 commit d7a7d3a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/pipefy_message/consumer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def process_message
log_text: "Message received by consumer poller, processed " \
"in #{elapsed_time_ms} milliseconds"
}, context, correlation_id, event_id))
$stdout.flush # Ensure everything is flushed to log after processing a message
end
rescue StandardError => e
context = "NO_CONTEXT_RETRIEVED" unless defined? context
Expand Down

0 comments on commit d7a7d3a

Please sign in to comment.