This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-releases-client.git
The following commit(s) were added to refs/heads/main by this push:
new c6e837b Allow users to set their own wait interval when polling check
tasks
c6e837b is described below
commit c6e837bfa7ff312c8eeb24b770b2ff5c56dffd7c
Author: Sean B. Palmer <[email protected]>
AuthorDate: Mon Jul 14 15:19:25 2025 +0100
Allow users to set their own wait interval when polling check tasks
---
pyproject.toml | 4 ++--
src/atrclient/client.py | 7 ++++++-
uv.lock | 4 ++--
3 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/pyproject.toml b/pyproject.toml
index 74aa123..206a98e 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -11,7 +11,7 @@ build-backend = "hatchling.build"
[project]
name = "apache-trusted-releases"
-version = "0.20250714.1413"
+version = "0.20250714.1419"
description = "ATR CLI and Python API"
readme = "README.md"
requires-python = ">=3.13"
@@ -72,4 +72,4 @@ select = [
]
[tool.uv]
-exclude-newer = "2025-07-14T14:13:00Z"
+exclude-newer = "2025-07-14T14:19:00Z"
diff --git a/src/atrclient/client.py b/src/atrclient/client.py
index 931e353..93debbb 100755
--- a/src/atrclient/client.py
+++ b/src/atrclient/client.py
@@ -157,7 +157,12 @@ def app_checks_wait(
/,
revision: str | None = None,
timeout: Annotated[int, cyclopts.Parameter(alias="-t", name="--timeout")]
= 60,
+ interval: Annotated[int, cyclopts.Parameter(alias="-i",
name="--interval")] = 500,
) -> None:
+ if interval < 500:
+ show_error_and_exit("Interval must be at least 500ms.")
+ if (interval / 1000) > timeout:
+ show_error_and_exit("Interval must be less than timeout.")
jwt_value = config_jwt_usable()
host, verify_ssl = config_host_get()
while True:
@@ -169,7 +174,7 @@ def app_checks_wait(
show_error_and_exit(f"Unexpected API response: {count}\n{e}")
if count.count == 0:
break
- time.sleep(0.5)
+ time.sleep(interval / 1000)
timeout -= 1
if timeout <= 0:
show_error_and_exit("Timeout waiting for checks to complete.")
diff --git a/uv.lock b/uv.lock
index a5aa3bd..04253fd 100644
--- a/uv.lock
+++ b/uv.lock
@@ -2,7 +2,7 @@ version = 1
requires-python = ">=3.13"
[options]
-exclude-newer = "2025-07-14T14:13:00Z"
+exclude-newer = "2025-07-14T14:19:00Z"
[[package]]
name = "aiohappyeyeballs"
@@ -83,7 +83,7 @@ wheels = [
[[package]]
name = "apache-trusted-releases"
-version = "0.20250714.1413"
+version = "0.20250714.1419"
source = { editable = "." }
dependencies = [
{ name = "aiohttp" },
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]