From c314de8682795caacb11cc71c6e7b81606c78aa7 Mon Sep 17 00:00:00 2001 From: Michal Konecny Date: Thu, 22 May 2025 11:50:21 +0200 Subject: [PATCH] [scm_request_processor] Lower the cache expiration The cache expiration for get_branches have to be lowered as it could block the processing of scm requests for a hour. This could happen when the processing fails after branch is already created, because of the cache this will not be reflected for another hour and toddler will try to create the branch again, which will fail. --- toddlers/utils/pagure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toddlers/utils/pagure.py b/toddlers/utils/pagure.py index 40d5f46..26f7870 100644 --- a/toddlers/utils/pagure.py +++ b/toddlers/utils/pagure.py @@ -690,7 +690,7 @@ class Pagure: return result - @cache.cache_on_arguments(expiration_time=3600) + @cache.cache_on_arguments(expiration_time=360) def get_branches(self, namespace: str, repo: str) -> Any: """ Return all branches for the specified repository.