diff --git a/pagure/templates/waiting.html b/pagure/templates/waiting.html index cb8c221..b1b7f58 100644 --- a/pagure/templates/waiting.html +++ b/pagure/templates/waiting.html @@ -2,13 +2,7 @@ {% block title %}Waiting{% endblock %} -{% block header %} - -{% endblock %} - {% block content %} - -
@@ -22,11 +16,25 @@ This page should be refreshed automatically, but if not click Here

+ {% if count >= 5 %} +

+ This is taking longer than usual... Sorry for that +

+ {% endif %}
+{% endblock %} - +{% block jscripts %} + {{ super() }} + {% endblock %} diff --git a/pagure/ui/app.py b/pagure/ui/app.py index 54eefad..a348982 100644 --- a/pagure/ui/app.py +++ b/pagure/ui/app.py @@ -504,9 +504,17 @@ def wait_task(taskid): return flask.redirect( flask.url_for(endpoint, **result)) else: + count = int(flask.request.args.get('count', 0)) + # First refresh in 10ms, after that, wait a second + delay = 10 if count == 0 else 1000 return flask.render_template( 'waiting.html', - taskid=taskid) + taskid=taskid, + wait_delay=str(delay), + count=count, + wait_next=flask.url_for('wait_task', + taskid=taskid, + count=str(count + 1))) @APP.route('/settings/', methods=('GET', 'POST'))