We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to figure out the easiest way to stream log output to the response since building is a slow process.
I'm thinking of
messages_to_yield = [] if result['build']: builder = forms.background_build( result['organization'], result['name'], result['commit'], log_stream=logger ) class Handler(logging.Handler): def emit(self, record): msg = self.format(record) messages_to_yield.append(msg) logger.addHandler(Handler()) def iterate_response(): import time builder.start_build() while builder.building: time.sleep(1) for msg in messages_to_yield.pop(): yield msg return api.Response(app_iter=iterate_response())
Any opinions about the simplest way to do this?
The text was updated successfully, but these errors were encountered:
currently implemented via gevent thread. probably better served as a worker task running in the background.
Sorry, something went wrong.
No branches or pull requests
Trying to figure out the easiest way to stream log output to the response since building is a slow process.
I'm thinking of
Any opinions about the simplest way to do this?
The text was updated successfully, but these errors were encountered: