* Represent jobs explicitly in the DB.

This commit is contained in:
Eelco Dolstra
2009-03-13 14:49:25 +00:00
parent a39a28dffb
commit ae364b9e5f
25 changed files with 178 additions and 57 deletions

View File

@ -27,7 +27,8 @@ create table Builds (
homepage text, -- meta.homepage
foreign key (project) references Projects(name), -- ignored by sqlite
foreign key (project, jobset) references Jobsets(project, name) -- ignored by sqlite
foreign key (project, jobset) references Jobsets(project, name), -- ignored by sqlite
foreign key (project, jobset, job) references Jobs(project, jobset, name) -- ignored by sqlite
);
@ -253,6 +254,27 @@ create table JobsetInputAlts (
);
create table Jobs (
project text not null,
jobset text not null,
name text not null,
-- `active' means the Nix expression for the jobset currently
-- contains this job. Otherwise it's a job that has been removed
-- from the expression.
active integer not null default 1,
errorMsg text, -- evalution error for this job
firstEvalTime integer, -- first time the scheduler saw this job
lastEvalTime integer, -- last time the scheduler saw this job
primary key (project, jobset, name),
foreign key (project) references Projects(name) on delete cascade, -- ignored by sqlite
foreign key (project, jobset) references Jobsets(project, name) on delete cascade -- ignored by sqlite
);
-- Cache for inputs of type "path" (used for testing Hydra), storing
-- the SHA-256 hash and store path for each source path. Also stores
-- the timestamp when we first saw the path have these contents, which