Closed baierDev closed 8 months ago
The stdout from hooks is parsed as JSON, so it expects a JSON object to be printed to stdout. If you want to log something, you should write that to stderr.
OK, thank you!
Can you give me a simple "static" code-sample how the python script (object) should look like ?
This has no errors, but how to read the output on client ?
#!/usr/bin/env python3
import time,json
msg1 = {"body":"start processing"}
msg2 = {"testmessage":"processing finished"}
y1 = json.dumps(msg1)
y2 = json.dumps(msg2)
print(y1)
time.sleep(5)
Please have a look at https://github.com/tus/tusd/tree/main/examples and https://github.com/tus/tusd/blob/main/docs/hooks.md#common-uses for examples.
Closing this issue due to inactivity. Feel free to leave a comment if you want to continue the discussion :)
Question I want to show (send) the actual "processing-state" of a pre-finish-hook to the client... How I make this to work ?
In my test-setup, i try to "simulate" a processing time with simple delay...
pre-finish file:
The tusd-log show me:
Setup details