diff --git a/src/hydra-eval-jobs/hydra-eval-jobs.cc b/src/hydra-eval-jobs/hydra-eval-jobs.cc index 7fadef71..ff3eef7c 100644 --- a/src/hydra-eval-jobs/hydra-eval-jobs.cc +++ b/src/hydra-eval-jobs/hydra-eval-jobs.cc @@ -127,6 +127,7 @@ static void findJobsWrapped(EvalState & state, JSONObject & top, res.attr("schedulingPriority", drv.queryMetaInt("schedulingPriority", 100)); res.attr("timeout", drv.queryMetaInt("timeout", 36000)); res.attr("maxSilent", drv.queryMetaInt("maxSilent", 7200)); + res.attr("isChannel", drv.queryMetaBool("isHydraChannel", false)); /* If this is an aggregate, then get its constituents. */ Bindings::iterator a = v.attrs->find(state.symbols.create("_hydraAggregate")); diff --git a/src/lib/Hydra/Helper/AddBuilds.pm b/src/lib/Hydra/Helper/AddBuilds.pm index 773b850d..aa7aa343 100644 --- a/src/lib/Hydra/Helper/AddBuilds.pm +++ b/src/lib/Hydra/Helper/AddBuilds.pm @@ -448,6 +448,7 @@ sub checkBuild { , busy => 0 , locker => "" , iscurrent => 1 + , ischannel => $buildInfo->{isChannel} }); $build->buildoutputs->create({ name => $_, path => $buildInfo->{outputs}->{$_} }) diff --git a/src/lib/Hydra/Schema/Builds.pm b/src/lib/Hydra/Schema/Builds.pm index b9dc0437..a22cd670 100644 --- a/src/lib/Hydra/Schema/Builds.pm +++ b/src/lib/Hydra/Schema/Builds.pm @@ -116,6 +116,12 @@ __PACKAGE__->table("Builds"); default_value: 36000 is_nullable: 1 +=head2 ischannel + + data_type: 'integer' + default_value: 0 + is_nullable: 1 + =head2 iscurrent data_type: 'integer' @@ -239,6 +245,8 @@ __PACKAGE__->add_columns( { data_type => "integer", default_value => 3600, is_nullable => 1 }, "timeout", { data_type => "integer", default_value => 36000, is_nullable => 1 }, + "ischannel", + { data_type => "integer", default_value => 0, is_nullable => 1 }, "iscurrent", { data_type => "integer", default_value => 0, is_nullable => 1 }, "nixexprinput", @@ -558,8 +566,8 @@ __PACKAGE__->many_to_many( ); -# Created by DBIx::Class::Schema::Loader v0.07043 @ 2015-08-10 15:10:41 -# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:rjifgnPtjY96MaQ7eiGzaA +# Created by DBIx::Class::Schema::Loader v0.07043 @ 2015-09-10 17:34:23 +# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:JRelp13Cyfi+QVxC92xuqQ __PACKAGE__->has_many( "dependents", diff --git a/src/sql/hydra.sql b/src/sql/hydra.sql index 15766402..2b3414ec 100644 --- a/src/sql/hydra.sql +++ b/src/sql/hydra.sql @@ -157,6 +157,7 @@ create table Builds ( maxsilent integer default 3600, -- meta.maxsilent timeout integer default 36000, -- meta.timeout + isChannel integer default 0, -- meta.isHydraChannel isCurrent integer default 0, -- Copy of the nixExprInput/nixExprPath fields of the jobset that diff --git a/src/sql/upgrade-42.sql b/src/sql/upgrade-42.sql new file mode 100644 index 00000000..558a1bea --- /dev/null +++ b/src/sql/upgrade-42.sql @@ -0,0 +1 @@ +alter table Builds add column isChannel integer not null default 0;