From 6efe0c37f3c1a331399397f9c3574b8fda1c3339 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 25 Nov 2008 11:09:15 +0000 Subject: [PATCH] --- src/{build.pl => Hydra/programs/Build.pl} | 4 ++-- src/{runner.pl => Hydra/programs/Runner.pl} | 9 +++++---- src/{scheduler.pl => Hydra/programs/Scheduler.pl} | 4 ++-- src/Hydra/root/layout.tt | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) rename src/{build.pl => Hydra/programs/Build.pl} (98%) rename src/{runner.pl => Hydra/programs/Runner.pl} (90%) rename src/{scheduler.pl => Hydra/programs/Scheduler.pl} (98%) diff --git a/src/build.pl b/src/Hydra/programs/Build.pl similarity index 98% rename from src/build.pl rename to src/Hydra/programs/Build.pl index cd23aa60..769c7a01 100644 --- a/src/build.pl +++ b/src/Hydra/programs/Build.pl @@ -3,10 +3,10 @@ use strict; use File::Basename; use File::stat; -use HydraFrontend::Schema; +use Hydra::Schema; -my $db = HydraFrontend::Schema->connect("dbi:SQLite:dbname=hydra.sqlite", "", "", {}); +my $db = Hydra::Schema->connect("dbi:SQLite:dbname=hydra.sqlite", "", "", {}); $db->storage->dbh->do("PRAGMA synchronous = OFF;"); diff --git a/src/runner.pl b/src/Hydra/programs/Runner.pl similarity index 90% rename from src/runner.pl rename to src/Hydra/programs/Runner.pl index e9e266e8..a5138755 100644 --- a/src/runner.pl +++ b/src/Hydra/programs/Runner.pl @@ -3,10 +3,10 @@ use strict; use Cwd; use POSIX qw(dup2); -use HydraFrontend::Schema; +use Hydra::Schema; -my $db = HydraFrontend::Schema->connect("dbi:SQLite:dbname=hydra.sqlite", "", "", {}); +my $db = Hydra::Schema->connect("dbi:SQLite:dbname=hydra.sqlite", "", "", {}); $db->storage->dbh->do("PRAGMA synchronous = OFF;"); @@ -49,6 +49,7 @@ sub checkJobs { $job->schedulingInfo->locker($$); $job->schedulingInfo->logfile($logfile); $job->schedulingInfo->update; + $job->buildsteps->delete_all; } }); @@ -65,8 +66,8 @@ sub checkJobs { open LOG, ">$logfile" or die; POSIX::dup2(fileno(LOG), 1) or die; POSIX::dup2(fileno(LOG), 2) or die; - exec("perl", "-IHydraFrontend/lib", "-w", - "./build.pl", $id); + exec("perl", "-IHydra/lib", "-w", + "./Hydra/programs/Build.pl", $id); warn "cannot start job " . $id; _exit(1); } diff --git a/src/scheduler.pl b/src/Hydra/programs/Scheduler.pl similarity index 98% rename from src/scheduler.pl rename to src/Hydra/programs/Scheduler.pl index 143ea642..2d7f6381 100644 --- a/src/scheduler.pl +++ b/src/Hydra/programs/Scheduler.pl @@ -2,10 +2,10 @@ use strict; use XML::Simple; -use HydraFrontend::Schema; +use Hydra::Schema; -my $db = HydraFrontend::Schema->connect("dbi:SQLite:dbname=hydra.sqlite", "", "", {}); +my $db = Hydra::Schema->connect("dbi:SQLite:dbname=hydra.sqlite", "", "", {}); $db->storage->dbh->do("PRAGMA synchronous = OFF;"); diff --git a/src/Hydra/root/layout.tt b/src/Hydra/root/layout.tt index 0105a0f6..3a7c018c 100644 --- a/src/Hydra/root/layout.tt +++ b/src/Hydra/root/layout.tt @@ -112,7 +112,7 @@ [% content %]