[?]
Nov 5, 2008, 1:58 AM
T7AHGVGMWWB3BDSY3SDB4KTSSQMKAJYEUL3QHVMM436LKH4LZSBQCDependencies
- [2]
X27GNHDV* Basic job info in the database. - [3]
WYN733ST* Store build duration, handle cached builds. - [4]
N22GPKYT* Put info about logs / build products in the DB.
Change contents
- replacement in src/scheduler.pl at line 52
});print " build ID = ", $build->id, "\n"; - replacement in src/scheduler.pl at line 54
return 0;my $logPath = "/nix/var/log/nix/drvs/" . basename $drvPath;if (-e $logPath) {print " LOG $logPath\n";$db->resultset('Buildlogs')->create({ buildid => $build->id, logphase => "full", path => $logPath, type => "raw"});} - replacement in src/scheduler.pl at line 65
my $dbh, my $description, my $jobName;if ($buildStatus == 0) { - replacement in src/scheduler.pl at line 67[2.6680]→[3.2422:2445](∅→∅),[3.2422]→[3.2422:2445](∅→∅),[3.2445]→[3.2686:3001](∅→∅),[3.3001]→[3.2656:2763](∅→∅),[3.2656]→[3.2656:2763](∅→∅),[3.2763]→[3.3002:3285](∅→∅),[3.3285]→[3.2763:2963](∅→∅),[3.2763]→[3.2763:2963](∅→∅),[3.3270]→[3.3270:3586](∅→∅)
$dbh->begin_work;$dbh->prepare("insert into builds(timestamp, jobName, description, drvPath, outPath, isCachedBuild, buildStatus, errorMsg, startTime, stopTime) values(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)")->execute(time(), $jobName, $description, $drvPath, $outPath, $isCachedBuild, $buildStatus, "", $startTime, $stopTime);my $buildId = $dbh->last_insert_id(undef, undef, undef, undef);print " db id = $buildId\n";my $logPath = "/nix/var/log/nix/drvs/" . basename $drvPath;if (-e $logPath) {print " LOG $logPath\n";$dbh->prepare("insert into buildLogs(buildId, logPhase, path, type) values(?, ?, ?, ?)")->execute($buildId, "full", $logPath, "raw");}if ($buildStatus == 0) {$dbh->prepare("insert into buildProducts(buildId, type, subtype, path) values(?, ?, ?, ?)")->execute($buildId, "nix-build", "", $outPath);if (-e "$outPath/log") {foreach my $logPath (glob "$outPath/log/*") {print " LOG $logPath\n";$dbh->prepare("insert into buildLogs(buildId, logPhase, path, type) values(?, ?, ?, ?)")->execute($buildId, basename($logPath), $logPath, "raw");$db->resultset('Buildproducts')->create({ buildid => $build->id, type => "nix-build", subtype => "", path => $outPath});if (-e "$outPath/log") {foreach my $logPath (glob "$outPath/log/*") {print " LOG $logPath\n";$db->resultset('Buildlogs')->create({ buildid => $build->id, logphase => basename($logPath), path => $logPath, type => "raw"});} - replacement in src/scheduler.pl at line 86
}}); - edit in src/scheduler.pl at line 89
$dbh->commit;