From 0e9d82bd1c5c51a1bbb708cafe7d431928a77ebc Mon Sep 17 00:00:00 2001 From: sgfost Date: Fri, 6 Sep 2024 13:26:47 -0700 Subject: [PATCH] refactor: use huey task for github mirroring --- .../library/codebases/releases/retrieve.jinja | 14 ++++-- django/library/models.py | 3 +- django/library/tasks.py | 45 +++++++++++++++++++ django/library/views.py | 6 +-- 4 files changed, 59 insertions(+), 9 deletions(-) create mode 100644 django/library/tasks.py diff --git a/django/library/jinja2/library/codebases/releases/retrieve.jinja b/django/library/jinja2/library/codebases/releases/retrieve.jinja index 4bcaa612f..3984662bd 100644 --- a/django/library/jinja2/library/codebases/releases/retrieve.jinja +++ b/django/library/jinja2/library/codebases/releases/retrieve.jinja @@ -303,9 +303,17 @@ {% if codebase.git_mirror %} - - view on Github - + {% if codebase.git_mirror.remote_url %} + + view on Github + + {% else %} +
+ Mirroring in progress. This may take a few seconds. +
+ Refresh +
+ {% endif %} {% elif has_change_perm %}