Skip to content
Merged
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
2 changes: 1 addition & 1 deletion app/api/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ async def _terminate_process(proc, timeout=5) -> Result[bool, Report]:
async def exec_bash_command(
command: str,
use_sudo: bool = False,
timeout: float | None = 10.0,
timeout: float | None = 15.0,
sensitive: bool = False,
) -> Result[ProcessResult, Report]:
"""
Expand Down
7 changes: 4 additions & 3 deletions app/apps/impl/raspiblitz.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ async def get_app_status_single(self, app_id: str) -> Result[AppStatus, Report]:
)
+ " status"
)
timeout = 30 if app_id == AppId.ELECTRS else None
except Exception as e:
exception_str = str(e)
report = Report(
Expand All @@ -86,7 +87,7 @@ async def get_app_status_single(self, app_id: str) -> Result[AppStatus, Report]:

return Err(report)

result = await exec_bash_command(script_call, use_sudo=True)
result = await exec_bash_command(script_call, use_sudo=True, timeout=timeout)
match result:
case Ok(value):
if value.stderr is not None and value.stderr != "":
Expand Down Expand Up @@ -504,14 +505,14 @@ async def _do_electrs_status_advanced() -> Result[AppStatus, Report]:

return Err(report)

result_status = await exec_bash_command(script_call_status)
result_status = await exec_bash_command(script_call_status, timeout=30)
match result_status:
case Ok(data):
result_status = data.stdout
case Err(report):
return Err(report)

result_sync = await exec_bash_command(script_call_sync)
result_sync = await exec_bash_command(script_call_sync, timeout=30)
match result_sync:
case Ok(data):
result_sync = data.stdout
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ line-length = 88
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"

# Assume Python 3.9.
target-version = "py39"
target-version = "py311"

[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1313,9 +1313,9 @@ typing-inspection==0.4.0 ; python_version >= "3.11" and python_version < "4.0" \
tzdata==2025.2 ; python_version >= "3.11" and python_version < "4.0" \
--hash=sha256:1a403fada01ff9221ca8044d701868fa132215d84beb92242d9acd2147f667a8 \
--hash=sha256:b60a638fcc0daffadf82fe0f57e53d06bdec2f36c4df66280ae79bce6bd6f2b9
urllib3==2.4.0 ; python_version >= "3.11" and python_version < "4.0" \
--hash=sha256:414bc6535b787febd7567804cc015fee39daab8ad86268f1310a9250697de466 \
--hash=sha256:4e16665048960a0900c702d4a66415956a584919c03361cac9f1df5c5dd7e813
urllib3==2.5.0 ; python_version >= "3.11" and python_version < "4.0" \
--hash=sha256:3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760 \
--hash=sha256:e6b01673c0fa6a13e374b50871808eb3bf7046c4b125b216f6bf1cc604cff0dc
uvicorn==0.34.2 ; python_version >= "3.11" and python_version < "4.0" \
--hash=sha256:0e929828f6186353a80b58ea719861d2629d766293b6d19baf086ba31d4f3328 \
--hash=sha256:deb49af569084536d269fe0a6d67e3754f104cf03aba7c11c40f01aadf33c403
Expand Down
Loading