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 12ac0c6be1cd846433ccaaf51d3f75be14304e9b
Author: Alastair McFarlane <[email protected]>
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to