This commit is contained in:
Eelco Dolstra 2008-11-26 13:39:15 +00:00
parent a36fab9293
commit 39f8b6110f
16 changed files with 50 additions and 28 deletions

View file

@ -8,8 +8,8 @@ use base 'DBIx::Class::Schema';
__PACKAGE__->load_classes; __PACKAGE__->load_classes;
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:TBu7KS/p71rCVTI6cl7Thw # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:E0tjF/wARKGxMml3bYcLFQ
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -36,8 +36,8 @@ __PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" });
__PACKAGE__->belongs_to("dependency", "Hydra::Schema::Builds", { id => "dependency" }); __PACKAGE__->belongs_to("dependency", "Hydra::Schema::Builds", { id => "dependency" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Z/kUflLoTmq+0tM82kxVYw # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ACPzMIxSYRMXkv8LGwR6lA
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -33,8 +33,8 @@ __PACKAGE__->set_primary_key("build", "productnr");
__PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" }); __PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gmWXPz3CSN4WOUTrcxXzQw # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:lREoFKnRpeyIMd+9AxbYuQ
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -29,8 +29,8 @@ __PACKAGE__->set_primary_key("id");
__PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" }); __PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7iNqQ1Q912X3/TiDPk/RWA # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6wMlFDXyRr0ElqsdFbRc3g
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -70,8 +70,8 @@ __PACKAGE__->has_many(
); );
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:u9AGxpJIQFY0RAILvnaIKA # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cX3mAlsEB9POMvmCcoWn6A
__PACKAGE__->has_many(dependents => 'Hydra::Schema::Buildinputs', 'dependency'); __PACKAGE__->has_many(dependents => 'Hydra::Schema::Buildinputs', 'dependency');

View file

@ -23,8 +23,8 @@ __PACKAGE__->set_primary_key("id");
__PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" }); __PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cqaeltO0pjpVPv2Ah54SQg # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:O6bwijQ4R6Ke9QjYjsuUsA
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -35,8 +35,8 @@ __PACKAGE__->set_primary_key("id", "stepnr");
__PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" }); __PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dJac1j1n7A2sQBrfgdLdYg # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7vdFywkKYZeLSow8AijaUA
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -22,8 +22,8 @@ __PACKAGE__->add_columns(
__PACKAGE__->set_primary_key("srcpath", "sha256hash"); __PACKAGE__->set_primary_key("srcpath", "sha256hash");
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5sHH9qbQ5WtUf2oRjXbwuw # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dPQ2YTZIUdMRwBbiu1qwUw
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -20,8 +20,8 @@ __PACKAGE__->add_columns(
__PACKAGE__->set_primary_key("uri", "revision"); __PACKAGE__->set_primary_key("uri", "revision");
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:k1xO/rt0fxTjvtkPY/Jwfw # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:EVNo1URK0XJTQo+KXHlmpA
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -22,6 +22,8 @@ __PACKAGE__->add_columns(
{ data_type => "integer", is_nullable => 0, size => undef }, { data_type => "integer", is_nullable => 0, size => undef },
"tag", "tag",
{ data_type => "text", is_nullable => 0, size => undef }, { data_type => "text", is_nullable => 0, size => undef },
"boolean",
{ data_type => "integer", is_nullable => 0, size => undef },
); );
__PACKAGE__->set_primary_key("project", "jobset", "input", "altnr"); __PACKAGE__->set_primary_key("project", "jobset", "input", "altnr");
__PACKAGE__->belongs_to( __PACKAGE__->belongs_to(
@ -31,8 +33,8 @@ __PACKAGE__->belongs_to(
); );
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:B8hAt4GezVJ1/uo4ZQ3Q2g # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:eM2dwDI3lL5EHwUA5m2pDg
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -43,8 +43,8 @@ __PACKAGE__->has_many(
); );
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4ev1n8miWroPWPRoQBc0cA # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:poDHcgoqxtQf8HN7AbpnOA
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -22,6 +22,8 @@ __PACKAGE__->add_columns(
{ data_type => "text", is_nullable => 0, size => undef }, { data_type => "text", is_nullable => 0, size => undef },
"errortime", "errortime",
{ data_type => "integer", is_nullable => 0, size => undef }, { data_type => "integer", is_nullable => 0, size => undef },
"lastcheckedtime",
{ data_type => "integer", is_nullable => 0, size => undef },
); );
__PACKAGE__->set_primary_key("project", "name"); __PACKAGE__->set_primary_key("project", "name");
__PACKAGE__->has_many( __PACKAGE__->has_many(
@ -48,8 +50,8 @@ __PACKAGE__->has_many(
); );
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7kRl30K427lecYirFGBxew # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BJwh19m9KHKZUMAiQ6fPAw
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -30,8 +30,8 @@ __PACKAGE__->has_many(
); );
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09 # Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZBkLod0Yw87pgQGAEuk7Zg # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:v/jpJlVZg1k8PDLJyZhpSA
# You can replace this text with custom content, and it will be preserved on regeneration # You can replace this text with custom content, and it will be preserved on regeneration

View file

@ -338,6 +338,11 @@ sub checkJobAlternatives {
sub checkJobSet { sub checkJobSet {
my ($project, $jobset) = @_; my ($project, $jobset) = @_;
my $inputInfo = {}; my $inputInfo = {};
$db->txn_do(sub {
$jobset->lastcheckedtime(time);
$jobset->update;
});
# Fetch the input containing the Nix expression. # Fetch the input containing the Nix expression.
(my $exprInput) = $jobset->jobsetinputs->search({name => $jobset->nixexprinput}); (my $exprInput) = $jobset->jobsetinputs->search({name => $jobset->nixexprinput});

View file

@ -92,6 +92,14 @@
<tt>[% INCLUDE maybeEditString param="jobset-$baseName-nixexprinput" value=jobset.nixexprinput extraClass="shortString" %]</tt> <tt>[% INCLUDE maybeEditString param="jobset-$baseName-nixexprinput" value=jobset.nixexprinput extraClass="shortString" %]</tt>
</td> </td>
</tr> </tr>
[% IF !edit %]
<tr>
<th>Last checked:</th>
<td>
[% PROCESS renderDateTime timestamp = jobset.lastcheckedtime %]
</td>
</tr>
[% END %]
[% IF !edit && jobset.errormsg %] [% IF !edit && jobset.errormsg %]
<tr> <tr>
<th>Last evaluation error:</th> <th>Last evaluation error:</th>

View file

@ -37,6 +37,8 @@ create table BuildSchedulingInfo (
locker text not null default '', -- !!! hostname/pid of the process building this job? locker text not null default '', -- !!! hostname/pid of the process building this job?
logfile text, -- if busy, the path of the logfile logfile text, -- if busy, the path of the logfile
disabled integer not null default 0, -- true means hold this job until its re-enabled
foreign key (id) references Builds(id) on delete cascade -- ignored by sqlite foreign key (id) references Builds(id) on delete cascade -- ignored by sqlite
); );
@ -63,6 +65,8 @@ create table BuildResultInfo (
logfile text, -- the path of the logfile logfile text, -- the path of the logfile
releaseName text, -- e.g. "patchelf-0.5pre1234" releaseName text, -- e.g. "patchelf-0.5pre1234"
keep integer not null default 0, -- true means never garbage-collect the build output
foreign key (id) references Builds(id) on delete cascade -- ignored by sqlite foreign key (id) references Builds(id) on delete cascade -- ignored by sqlite
); );
@ -81,11 +85,11 @@ create table BuildSteps (
busy integer not null, busy integer not null,
status integer, status integer, -- 0 = success, 1 = failed
errorMsg text, errorMsg text,
startTime integer, -- in Unix time, 0 = used cached build result startTime integer,
stopTime integer, stopTime integer,
primary key (id, stepnr), primary key (id, stepnr),
@ -174,6 +178,7 @@ create table Jobsets (
nixExprPath text not null, -- relative path of the Nix expression nixExprPath text not null, -- relative path of the Nix expression
errorMsg text, -- used to signal the last evaluation error etc. for this jobset errorMsg text, -- used to signal the last evaluation error etc. for this jobset
errorTime integer, -- timestamp associated with errorMsg errorTime integer, -- timestamp associated with errorMsg
lastCheckedTime integer, -- last time the scheduler looked at this jobset
primary key (project, name), primary key (project, name),
foreign key (project) references Projects(name) on delete cascade, -- ignored by sqlite foreign key (project) references Projects(name) on delete cascade, -- ignored by sqlite
foreign key (project, name, nixExprInput) references JobsetInputs(project, job, name) foreign key (project, name, nixExprInput) references JobsetInputs(project, job, name)