From 326ffbb5317e784bc878ca1aa868e3d9f94cd024 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 22 Oct 2017 23:46:15 +0100 Subject: [PATCH] builders: Drop overload concept Signed-off-by: Michael Tremer --- src/buildservice/builders.py | 7 ------- src/database.sql | 1 - src/templates/builders/detail.html | 12 ------------ src/templates/builders/list.html | 3 --- 4 files changed, 23 deletions(-) diff --git a/src/buildservice/builders.py b/src/buildservice/builders.py index d10fc7c..861e324 100644 --- a/src/buildservice/builders.py +++ b/src/buildservice/builders.py @@ -333,13 +333,6 @@ class Builder(base.DataObject): def space_free(self): return self.data.space_free - @property - def overload(self): - if not self.cpu_count or not self.loadavg1: - return None - - return self.loadavg1 >= self.cpu_count - @property def host_key_id(self): return self.data.host_key_id diff --git a/src/database.sql b/src/database.sql index 53be666..529c93a 100644 --- a/src/database.sql +++ b/src/database.sql @@ -563,7 +563,6 @@ CREATE TABLE builders ( cpu_arch text, cpu_bogomips double precision, memory bigint DEFAULT 0 NOT NULL, - overload builders_overload DEFAULT 'N'::builders_overload NOT NULL, free_space bigint DEFAULT 0 NOT NULL, host_key_id text, time_created timestamp without time zone DEFAULT now() NOT NULL, diff --git a/src/templates/builders/detail.html b/src/templates/builders/detail.html index 85358fb..dc4d807 100644 --- a/src/templates/builders/detail.html +++ b/src/templates/builders/detail.html @@ -80,15 +80,6 @@ {% end %} - {% if builder.overload %} -
-

{{ _("Warning") }}!

- {{ _("This builder is overloaded.") }} - {{ _("That means it will not take any additional jobs although it has not reached its threshold of running jobs, yet.") }} - {{ _("New jobs will be started automatically after the load decreased.") }} -
- {% end %} -
@@ -192,9 +183,6 @@ diff --git a/src/templates/builders/list.html b/src/templates/builders/list.html index cf6ac19..19f5aef 100644 --- a/src/templates/builders/list.html +++ b/src/templates/builders/list.html @@ -42,9 +42,6 @@
{{ _("Load average") }} {{ builder.loadavg or _("N/A") }} - {% if builder.overload %} - {{ _("Overload") }} - {% end %}
{{ builder.name }} - {% if builder.overload %} - {{ _("Overload") }} - {% end %}
{{ builder.cpu_model or _("Unknown CPU") }} {% if builder.mem_total %} -- 2.47.3