Skip to content
GitLab
Menu
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
d214a9a3
Commit
d214a9a3
authored
Jun 09, 2003
by
Mac Newbold
Browse files
Put proper defaults into the db for idleswap* when starting expts.
parent
d8da0f6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
tbsetup/batchexp.in
View file @
d214a9a3
...
...
@@ -112,6 +112,13 @@ if (! TBProjAccessCheck($dbuid, $pid, $gid, TB_PROJECT_CREATEEXPT)) {
"
You do not have permission to create experiments in
$pid
/
$gid
\n
");
}
# Must do this before lock tables!
# idleswap is in minutes, threshold is in hours
$idleswap_time
=
60
*
TBGetSiteVar
("
idle/threshold
");
# XXX : Remove this and the idle parts of the insert below when we get
# the new form committed, and they get filled in according to what the
# expt creator requested.
#
# Create an experiment record. The pid/eid has to be unique, so lock the
# table for the check/insert.
...
...
@@ -134,11 +141,12 @@ if ($query_result->numrows) {
# will recognize it.
#
if
(
!
DBQueryWarn
("
INSERT INTO experiments
"
.
"
(eid, pid, gid, expt_created, expt_expires, expt_name,
"
.
"
expt_head_uid,expt_swap_uid, state, priority, swappable)
"
.
"
(eid, pid, gid, expt_created, expt_expires, expt_name,
"
.
"
expt_head_uid,expt_swap_uid, state, priority, swappable,
"
.
"
idleswap, idleswap_timeout)
"
.
"
VALUES ('
$eid
', '
$pid
', '
$gid
', now(), '
$expires
',
"
.
"
$description
,'
$dbuid
', '
$dbuid
', 'new',
$priority
,
"
.
"
$swappable
)
"))
{
"
$swappable
, 1, '
$idleswap_time
'
)
"))
{
DBQueryWarn
("
unlock tables
");
die
("
*** $0:
\n
"
.
"
Database error inserting record for
$pid
/
$eid
!
\n
");
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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