File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,13 +86,13 @@ <h1>Pipeline Dashboard</h1>
8686 worker{{ additional|pluralize }} for the {{ queue_name }} queue. ">
8787 < span class ="icon "> < i class ="fa fa-exclamation-triangle "> </ i > </ span >
8888 </ span >
89- {% elif load_factor < 1 %}
89+ {% elif additional < 1 %}
9090 < span class ="has-text-weight-bold is-size-6 has-text-success has-tooltip-arrow has-tooltip-multiline has-tooltip-success "
9191 data-tooltip ="{{ queue_name|capfirst }} queue perfectly balanced. ">
9292 {{ load_factor|floatformat:2 }}
9393 < span class ="icon "> < i class ="fa fa-check-circle "> </ i > </ span >
9494 </ span >
95- {% elif load_factor < 1 .6 %}
95+ {% elif additional < 2 %}
9696 < span class ="has-text-weight-bold is-size-6 has-text-orange has-tooltip-arrow has-tooltip-multiline has-tooltip-orange "
9797 data-tooltip ="Consider adding {{ additional }} additional worker{{ additional|pluralize }} to the {{ queue_name }} queue. ">
9898 {{ load_factor|floatformat:2 }}
Original file line number Diff line number Diff line change 5959
6060PAGE_SIZE = 10
6161
62- CACHE_TIMEOUT = 60 * 5
63-
6462
6563class VulnerableCodeView (View ):
6664 """
@@ -965,11 +963,12 @@ def get_queryset(self):
965963
966964 def get_context_data (self , ** kwargs ):
967965 context = super ().get_context_data (** kwargs )
966+ cache_timeout = 60 * 10
968967 load_per_queue = cache .get ("load_per_queue" )
969968
970969 if load_per_queue is None :
971970 load_per_queue = compute_queue_load_factor ()
972- cache .set ("load_per_queue" , load_per_queue , CACHE_TIMEOUT )
971+ cache .set ("load_per_queue" , load_per_queue , cache_timeout )
973972
974973 context ["load_per_queue" ] = load_per_queue
975974 context ["active_pipeline_count" ] = PipelineSchedule .objects .filter (is_active = True ).count ()
You can’t perform that action at this time.
0 commit comments