Skip to content

Commit

Permalink
[airbyte-cdk] follow-up #40681 - flush buffer for each RATE_LIMITED m…
Browse files Browse the repository at this point in the history
…essage print (#41463)
  • Loading branch information
lazebnyi committed Jul 10, 2024
1 parent c62ed11 commit 338f33a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ def _send(
# Simply printing the stream status is a temporary solution and can cause future issues. Currently, the _send method is
# wrapped with backoff decorators, and we can only emit messages by iterating record_iterator in the abstract source at the
# end of the retry decorator behavior. This approach does not allow us to emit messages in the queue before exiting the
# backoff retry loop.
print(message)
# backoff retry loop. Adding `\n` to the message and ignore 'end' ensure that few messages are printed at the same time.
print(f"{message}\n", end="", flush=True)

if error_resolution.response_action == ResponseAction.FAIL:
if response:
Expand Down

0 comments on commit 338f33a

Please sign in to comment.