-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
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
Fixed output of logs (tail/maintail) in the Web UI #195
Conversation
… give the contents via tail_f_producer.more()
Could you please let me know the issue that this patch fixes, and how to check it? |
Hello, I run the Web UI ( I look at the source code, and thought it simply forgot to call And more, I think that we should instead literal
pass this argument, which must be defined in the configuration file. |
Could this please be reviewed and either accepted or rejected asap? Blocks: #149 |
+1 to review and accept this. |
Please merge this. |
I don't think this change is correct because it breaks Python script
Minimal
Running
Tailing the log with
Before this patch, |
Please consider my fix #471 |
@@ -733,7 +733,7 @@ def handle_request(self, request): | |||
# the lack of a Content-Length header makes the outputter | |||
# send a 'Transfer-Encoding: chunked' response | |||
|
|||
request.push(tail_f_producer(request, logfile, 1024)) | |||
request.push(tail_f_producer(request, logfile, 1024).more()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original code pushed the tail_f_producer
instance onto the request. This was intentional because the code is asynchronous. Once the producer instance is pushed, the event loop will call more()
on it each time it comes around. This is how we are able to stream log output continuously when you use supervisorctl tail -f
.
This patch changed the code to push the result of tail_f_producer(x).more()
instead of the producer instance. The result of more()
will be a string with some log output. This is why the patch may have appeared to fix the output on the web interface. However, this doesn't set up the producer in the event loop like we originally intended, and it can never stream this way (the -f
in tail -f
).
Because forgot to give the contents via
tail_f_producer.more()