From: Michael Tremer Date: Sun, 22 Oct 2017 22:46:15 +0000 (+0100) Subject: builders: Drop overload concept X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=326ffbb5317e784bc878ca1aa868e3d9f94cd024;p=pbs.git builders: Drop overload concept Signed-off-by: Michael Tremer --- diff --git a/src/buildservice/builders.py b/src/buildservice/builders.py index d10fc7c6..861e324e 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 53be6662..529c93ac 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 85358fb5..dc4d8077 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 cf6ac190..19f5aef6 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 %}