1
0
mirror of https://github.com/quay/quay.git synced 2026-01-26 06:21:37 +03:00

autoprune: updating task status to running (PROJQUAY-6213) (#2413)

updating task status to running
This commit is contained in:
Brandon Caton
2023-10-17 10:13:05 -04:00
committed by GitHub
parent fa8aaa328f
commit e8a6552cd0

View File

@@ -277,6 +277,7 @@ def fetch_autoprune_task(task_run_interval_ms=60 * 60 * 1000):
return None
task.last_ran_ms = get_epoch_timestamp_ms()
task.status = "running"
task.save()
return task
@@ -405,7 +406,7 @@ def execute_policy_on_repo(policy, repo_id, namespace_id, tag_page_limit=100):
namespace = user.get_namespace_user_by_user_id(namespace_id)
repo = repository.lookup_repository(repo_id)
logger.info("Executing autoprune policy: %s on repo: %s", policy.method, repo.name)
logger.debug("Executing autoprune policy: %s on repo: %s", policy.method, repo.name)
policy_to_func_map[policy.method](repo, policy.config, namespace, tag_page_limit)