Skip to content
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

Add configurable wget command timeout #150

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion component/timelapse.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ def __init__(self, confighelper: ConfigHelper) -> None:
"ffmpeg_binary_path", "/usr/bin/ffmpeg")
self.wget_skip_cert = confighelper.getboolean(
"wget_skip_cert_check", False)
self.wget_timeout_seconds = confighelper.getfloat(
"wget_timeout_seconds", 2.0)

# Setup default config
self.config: Dict[str, Any] = {
Expand Down Expand Up @@ -478,7 +480,7 @@ async def newframe(self) -> None:
shell_cmd: SCMDComp = self.server.lookup_component('shell_command')
scmd = shell_cmd.build_shell_command(cmd, None)
try:
cmdstatus = await scmd.run(timeout=2., verbose=False)
cmdstatus = await scmd.run(timeout=self.wget_timeout_seconds, verbose=False)
except Exception:
logging.exception(f"Error running cmd '{cmd}'")

Expand Down
1 change: 1 addition & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ does.
#previewimage: True
#saveframes: False
#wget_skip_cert_check: False
#wget_timeout_seconds: 2

```

Expand Down