service-streamer
service-streamer copied to clipboard
Worker_timeout
why worker timeout is a not parameter to ThreadedStreamer, my Object detection model takes 5 seconds to do inference on image and I want to increase it
I've run into this problem as well. In case it helps someones, you can modify this timeout from the installation:
f=$(python -c 'import service_streamer as ss; print(ss.service_streamer.__file__)')
echo "$f"
# Modify variable `WORKER_TIMEOUT` from $f with the desired value
desired_value="60" # Modify this variable
cat "$f" | grep "^WORKER_TIMEOUT" # Current value
# Modify the file
sed -E -i "s/^WORKER_TIMEOUT = [0-9]+\$/WORKER_TIMEOUT = ${desired_value}/" "$f"
you can do
import service_streamer
service_streamer.service_streamer.WORKER_TIMEOUT = 120
before importing the Streamer