webhook icon indicating copy to clipboard operation
webhook copied to clipboard

Add ability to stream command output as a response (fixes conflict #443)

Open lostsnow opened this issue 3 years ago • 8 comments

Just fix conflict pr #443, thanks @milolav

lostsnow avatar Aug 04 '21 04:08 lostsnow

would it be possible to get this merged? we've got a long running command, and only see the output after everything finished. streaming the output would be really great.

manukall avatar Oct 15 '21 15:10 manukall

Much needed. Please merge.

wille avatar Feb 15 '22 14:02 wille

Any news about this PR? The feature would be quite useful.

sto avatar Sep 12 '22 21:09 sto

Any news about this PR?

Ftrybe avatar Apr 03 '24 05:04 Ftrybe

I'll try to test this out next week, and hopefully get it merged if I don't run into any issues :)

adnanh avatar Apr 13 '24 21:04 adnanh

Hmm, in order to get the streaming to work, I had to set these headers in the response as well:

 w.Header().Set("Content-Type", "text/event-stream")
 w.Header().Set("Cache-Control", "no-cache")
 w.Header().Set("Connection", "keep-alive")

Without those headers I observed command output not being streamed, but rather buffered & spit out after the connection is closed.

Do you think this header override is acceptable?

Another question, should we also stream the output to the logs in parallel, maybe even introduce a separate setting "include-command-output-in-the-logs" (or something less verbose)? :)

adnanh avatar Apr 16 '24 19:04 adnanh