OSVLMLCQQ52E47CX7TZAIFZSO4VVGRHWJTZY2G23YUPMDCKURTYAC
LP3ITP6RWOKHMSXICI662QUERC4MMUXJTAYKKKHTBXRPFNSXMWGAC
JI26P3PCQPZIGGHHUYVBCAHVZCFCI3XS7P3742JI2S5TI3TPFGEQC
A52HEFHQNVNF2OUSWDSUYVVXLYR2UFCGOORPCN27CJJYA4UDJA3AC
LBNVQXUBEZ45SOTGVXK5UEZXIAIZTJLWZNUYFI4JZ6J65N3KPDVQC
LZO3C2KIACZ3HN72RBGWWIT5ED4RJMYKI3SAHXT6RIUPHDFL3STQC
ZILILXXKP4Z64UGIXIPTQ3KXPV76LFGSXVFLMLCO2HJBCQ5GP6AQC
INRF7S4N5WETRJDO7ZVYTONEHDPNL3GTY4PJGJKDJKI6M4JDQV3AC
NLJJZVHO3UXBURL2P7VGGCVUOMKFUYT3UX5JXQU3FFFAHUGEKO3AC
OOQ2D3KCLFPYNAN253PHWLBQMB6OMO2KYQWQXLTP65SQAYZWQ5LAC
3XTHEUMP2ZOMPQWE3S5QWHIHCEJNEXGDPQB3JUVZFPS3RFMY455QC
txn_do($c->model('DB')->schema, sub {
my $drvpath = $build->drvpath ;
error($c, "This build cannot be restarted.")
unless $build->finished && -f $drvpath ;
my $cmd = "`nix-store -qR $drvpath`";
my $r = `nix-store --clear-failed-paths $cmd`;
$build->update({finished => 0, timestamp => time});
$build->resultInfo->delete;
my $drvpath = $build->drvpath ;
error($c, "This build cannot be restarted.")
unless $build->finished && -f $drvpath ;
our @EXPORT = qw(fetchInput evalJobs checkBuild inputsToArgs captureStdoutStderr getReleaseName getBuildLog addBuildProducts);
our @EXPORT = qw(fetchInput evalJobs checkBuild inputsToArgs captureStdoutStderr getReleaseName getBuildLog addBuildProducts restartBuild);
sub restartBuild {
my ($db, $build) = @_;
txn_do($db, sub {
my $drvpath = $build->drvpath ;
my $outpath = $build->outpath ;
my $paths = "";
foreach my $bs ($build->buildsteps) {
$paths = $paths . " " . $bs->outpath;
}
my $r = `nix-store --clear-failed-paths $paths $outpath`;
$build->update({finished => 0, timestamp => time});
$build->resultInfo->delete;
$db->resultset('BuildSchedulingInfo')->create(
{ id => $build->id
, priority => 0 # don't know the original priority anymore...
, busy => 0
, locker => ""
});
});
}