Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
40e557d0
Commit
40e557d0
authored
Sep 25, 2001
by
Leigh B. Stoller
Browse files
Some more minor changes for the started/ended/expires/created date problems
that Mike reported.
parent
f629146b
Changes
3
Hide whitespace changes
Inline
Side-by-side
tbsetup/batch_daemon.in
View file @
40e557d0
...
...
@@ -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.
...
...
tbsetup/batchexp.in
View file @
40e557d0
...
...
@@ -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
...
...
www/showbatch.php3
View file @
40e557d0
...
...
@@ -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
"
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment