Skip to content

Commit

Permalink
frontend: do not display recent builds box on main page
Browse files Browse the repository at this point in the history
This is taking so much time. And even when it is cached it is taking down whole server.
  • Loading branch information
xsuchy authored and FrostyX committed Sep 19, 2023
1 parent a19c0fa commit 251d76f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions frontend/coprs_frontend/coprs/templates/_helpers.html
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ <h3 class="panel-title"> Task Queue </h3>
<div class="panel-heading">
<h3 class="panel-title"> Recent Builds - <a href="{{ url_for('recent_ns.all') }}">View All</a></h3>
</div>
{%- if builds %}
<div class="list-group">
{% for build in builds %}
<a href="{{copr_url('coprs_ns.copr_build', build.copr, build_id=build.id)}}" class="list-group-item">
Expand All @@ -380,6 +381,7 @@ <h4 class="list-group-item-heading">{{build.package.name}}</h4>
</a>
{% endfor %}
</div>
{% endif %}
</div>
{% endmacro %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ def coprs_show(page=1):
# flask.g.user is none when no user is logged - showing builds from everyone
# TODO: builds_logic.BuildsLogic.get_recent_tasks(flask.g.user, 5) takes too much time, optimize sql
# users_builds = builds_logic.BuildsLogic.get_recent_tasks(flask.g.user, 5)
users_builds = builds_logic.BuildsLogic.get_recent_tasks(None, 4)
# users_builds = builds_logic.BuildsLogic.get_recent_tasks(None, 4)
# err - this is all taking so much time, do not display this box on main page
users_builds = None

data = builds_logic.BuildsLogic.get_small_graph_data('30min')

Expand Down

0 comments on commit 251d76f

Please sign in to comment.