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;
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:TBu7KS/p71rCVTI6cl7Thw
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07
# 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

View file

@ -36,8 +36,8 @@ __PACKAGE__->belongs_to("build", "Hydra::Schema::Builds", { id => "build" });
__PACKAGE__->belongs_to("dependency", "Hydra::Schema::Builds", { id => "dependency" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Z/kUflLoTmq+0tM82kxVYw
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ACPzMIxSYRMXkv8LGwR6lA
# 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" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:gmWXPz3CSN4WOUTrcxXzQw
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07
# 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

View file

@ -29,8 +29,8 @@ __PACKAGE__->set_primary_key("id");
__PACKAGE__->belongs_to("id", "Hydra::Schema::Builds", { id => "id" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7iNqQ1Q912X3/TiDPk/RWA
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6wMlFDXyRr0ElqsdFbRc3g
# 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
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:u9AGxpJIQFY0RAILvnaIKA
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cX3mAlsEB9POMvmCcoWn6A
__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" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:cqaeltO0pjpVPv2Ah54SQg
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:O6bwijQ4R6Ke9QjYjsuUsA
# 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" });
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dJac1j1n7A2sQBrfgdLdYg
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7vdFywkKYZeLSow8AijaUA
# 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");
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:5sHH9qbQ5WtUf2oRjXbwuw
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:dPQ2YTZIUdMRwBbiu1qwUw
# 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");
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:k1xO/rt0fxTjvtkPY/Jwfw
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07
# 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

View file

@ -22,6 +22,8 @@ __PACKAGE__->add_columns(
{ data_type => "integer", is_nullable => 0, size => undef },
"tag",
{ 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__->belongs_to(
@ -31,8 +33,8 @@ __PACKAGE__->belongs_to(
);
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:B8hAt4GezVJ1/uo4ZQ3Q2g
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:eM2dwDI3lL5EHwUA5m2pDg
# 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
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:4ev1n8miWroPWPRoQBc0cA
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:poDHcgoqxtQf8HN7AbpnOA
# 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 },
"errortime",
{ data_type => "integer", is_nullable => 0, size => undef },
"lastcheckedtime",
{ data_type => "integer", is_nullable => 0, size => undef },
);
__PACKAGE__->set_primary_key("project", "name");
__PACKAGE__->has_many(
@ -48,8 +50,8 @@ __PACKAGE__->has_many(
);
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-25 19:24:09
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7kRl30K427lecYirFGBxew
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:BJwh19m9KHKZUMAiQ6fPAw
# 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
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:ZBkLod0Yw87pgQGAEuk7Zg
# Created by DBIx::Class::Schema::Loader v0.04005 @ 2008-11-26 14:37:07
# 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

View file

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

View file

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

View file

@ -38,6 +38,8 @@ create table BuildSchedulingInfo (
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
);
@ -64,6 +66,8 @@ create table BuildResultInfo (
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
);
@ -81,11 +85,11 @@ create table BuildSteps (
busy integer not null,
status integer,
status integer, -- 0 = success, 1 = failed
errorMsg text,
startTime integer, -- in Unix time, 0 = used cached build result
startTime integer,
stopTime integer,
primary key (id, stepnr),
@ -174,6 +178,7 @@ create table Jobsets (
nixExprPath text not null, -- relative path of the Nix expression
errorMsg text, -- used to signal the last evaluation error etc. for this jobset
errorTime integer, -- timestamp associated with errorMsg
lastCheckedTime integer, -- last time the scheduler looked at this jobset
primary key (project, name),
foreign key (project) references Projects(name) on delete cascade, -- ignored by sqlite
foreign key (project, name, nixExprInput) references JobsetInputs(project, job, name)