Commit 40e557d0 authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Some more minor changes for the started/ended/expires/created date problems

that Mike reported.
parent f629146b
......@@ -156,6 +156,9 @@ while (1) {
my $eid = $pending_row{'eid'};
my $pid = $pending_row{'pid'};
my $now = `date '+20%y-%m-%d %H:%M:%S'`;
if ($now =~ /^([-\@\w: ]+)$/) {
$now = $1;
}
$query_result =
DBQuery("update batch_experiments set status='configuring', ".
......@@ -315,17 +318,22 @@ sub startexp($)
my $creator = $exphash{'creator_uid'};
my $longname = $exphash{'name'};
my $attempts = $exphash{'attempts'};
my $expires = $exphash{'expires'};
#
# Insert an experiment record for startexp.
#
my $rightnow = `date '+20%y-%m-%d %H:%M:%S'`;
if ($rightnow =~ /^([-\@\w: ]+)$/) {
$rightnow = $1;
}
$query_result =
DBQueryFatal("insert into experiments ".
"(eid, pid, expt_created, expt_name, ".
"expt_head_uid, state, batchmode) ".
"expt_head_uid, expt_expires, state, batchmode) ".
"VALUES ('$eid', '$pid', '$rightnow', '$longname', ".
"'$creator', 'new', 1)");
"'$creator', '$expires', 'new', 1)");
#
# Try to start the experiment. If it fails, the experiment is gone.
......
......@@ -179,6 +179,9 @@ if (system("$parser -n -a $nsfile") != 0) {
# Gen up the creation time.
#
$created = `date '+%Y:%m:%d %H:%M:%S'`;
if ($created =~ /^([-\@\w: ]+)$/) {
$created = $1;
}
#
# Insert the record. We leave this to very last cause the batch daemon
......
......@@ -120,9 +120,10 @@ echo "<p><center>
</center>\n";
#
# Dump experiment record if its currently running.
# Dump experiment record if its currently running or configuring.
#
if (strcmp($status, "running") == 0) {
if (strcmp($status, "running") == 0 ||
strcmp($status, "configuring") == 0) {
echo "<center>
<h1>Experiment Information</h1>
</center>\n";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment