You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tooling.apache.org by ar...@apache.org on 2026/02/20 09:35:31 UTC
(tooling-trusted-releases) 01/03: Remove check for task running
This is an automated email from the ASF dual-hosted git repository.
arm pushed a commit to branch arm
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
commit 28af795893969ad72dc84e2e6b0ba692fc522db4
Author: Alastair McFarlane <ar...@apache.org>
AuthorDate: Tue Feb 17 16:36:20 2026 +0000
Remove check for task running
---
atr/tasks/__init__.py | 23 +++++------------------
1 file changed, 5 insertions(+), 18 deletions(-)
diff --git a/atr/tasks/__init__.py b/atr/tasks/__init__.py
index 42e03406..3d16d841 100644
--- a/atr/tasks/__init__.py
+++ b/atr/tasks/__init__.py
@@ -298,29 +298,16 @@ async def queued(
extra_args: dict[str, Any] | None = None,
check_cache_key: dict[str, Any] | None = None,
) -> sql.Task | None:
- # If there's a queued or running task for this same set of inputs and hash value, don't start a new one
- # If there isn't one, but there is an existing check result, also don't run a new task, just use the existing one
if check_cache_key is not None:
hash_val = hashes.compute_dict_hash(check_cache_key)
if not data:
raise RuntimeError("DB Session is required for check_cache_key")
- existing_task = await data.task(
- inputs_hash=hash_val,
- project_name=release.project_name,
- version_name=release.version,
- task_args=extra_args or {},
- status_in=[sql.TaskStatus.QUEUED, sql.TaskStatus.ACTIVE],
- ).all()
- if existing_task:
+ existing = await data.check_result(inputs_hash=hash_val, release_name=release.name).all()
+ if existing:
+ await attestable.write_checks_data(
+ release.project.name, release.version, revision_number, [c.id for c in existing]
+ )
return None
- else:
- existing = await data.check_result(inputs_hash=hash_val, release_name=release.name).all()
- if existing:
- await attestable.write_checks_data(
- release.project.name, release.version, revision_number, [c.id for c in existing]
- )
- return None
-
return sql.Task(
status=sql.TaskStatus.QUEUED,
task_type=task_type,
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org