From 6c10313eea7b1691580f848e83cfd89e34aefaba Mon Sep 17 00:00:00 2001 From: Kenny Lee Sin Cheong <2530351+kleesc@users.noreply.github.com> Date: Tue, 7 Jan 2025 15:05:17 -0500 Subject: [PATCH] gc: allow setting the repositorygc queueitems' availability (PROJQUAY-8408) (#3551) --- data/model/repository.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/data/model/repository.py b/data/model/repository.py index d8e6e30444..50c3534d65 100644 --- a/data/model/repository.py +++ b/data/model/repository.py @@ -664,7 +664,9 @@ def set_repository_state(repo, state): repo.save() -def mark_repository_for_deletion(namespace_name, repository_name, repository_gc_queue): +def mark_repository_for_deletion( + namespace_name, repository_name, repository_gc_queue, available_after=0 +): """ Marks a repository for future deletion in the background. @@ -695,6 +697,7 @@ def mark_repository_for_deletion(namespace_name, repository_name, repository_gc_ "original_name": repository_name, } ), + available_after=available_after, ) marker.save()