]> mj.ucw.cz Git - bex.git/commitdiff
Newly inserted jobs immediately enter NEW status
authorMartin Mares <mj@ucw.cz>
Mon, 31 Oct 2011 12:38:59 +0000 (13:38 +0100)
committerMartin Mares <mj@ucw.cz>
Mon, 31 Oct 2011 12:38:59 +0000 (13:38 +0100)
NOTES
benq

diff --git a/NOTES b/NOTES
index 703001534933c078613c91d2bd86f0b3b7129939..561abd6b13715bb29ea9af7b17a9e06801636b74 100644 (file)
--- a/NOTES
+++ b/NOTES
@@ -45,6 +45,7 @@ Message: <msg>                        (Optional) human-readable message explaining the status
 
 ### Status codes ###
 
+NEW            Newly inserted job, which did not run yet
 NOPING         Host does not respond to ping
 NOXFER         Transfer of the job body to a temporary file on the host has failed
 OK             Job finished successfully (this is usually not seen in the queue, since
diff --git a/benq b/benq
index c401720c477c03223ae55db10793884e6fb5114c..b4b6735fc517103b8c0795863753c6296af9a502 100755 (executable)
--- a/benq
+++ b/benq
@@ -43,6 +43,7 @@ print "New job ", $job->id, "\n";
 my $queue = BEX::Queue->new($queue_name);
 for my $m (@machines) {
        if ($queue->enqueue($m, $job)) {
+               $queue->write_job_status($m, $job->id, { 'Time' => time, 'Status' => 'NEW' });
                print "\t$m\n";
        } else {
                print "\t$m (already queued)\n";