Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ensembl-gh-mirror
ensembl-hive
Commits
20a523f0
Commit
20a523f0
authored
Jan 11, 2005
by
Jessica Severin
Browse files
changed sql INSERT syntax to be compliant with postgreSQL
parent
33dd49ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
modules/Bio/EnsEMBL/Hive/Queen.pm
modules/Bio/EnsEMBL/Hive/Queen.pm
+4
-3
No files found.
modules/Bio/EnsEMBL/Hive/Queen.pm
View file @
20a523f0
...
...
@@ -131,8 +131,9 @@ sub create_new_worker {
$pid
=
getppid
unless
(
$pid
);
$beekeeper
=
''
unless
(
$beekeeper
);
my
$sql
=
"
INSERT INTO hive SET born=now(), last_check_in=now(),
"
.
"
process_id=?, analysis_id=?, beekeeper=?, host=?
";
my
$sql
=
q{INSERT INTO hive
(born, last_check_in, process_id, analysis_id, beekeeper, host)
VALUES (NOW(), NOW(), ?,?,?,?)}
;
my
$sth
=
$self
->
prepare
(
$sql
);
$sth
->
execute
(
$pid
,
$analysisStats
->
analysis_id
,
$beekeeper
,
$host
);
...
...
@@ -434,7 +435,7 @@ sub get_num_needed_workers {
printf
("
%5d (%1.3f)
",
$numWorkers
,
$availableLoad
);
$analysis_stats
->
print_stats
();
}
else
{
my
$workerCount
=
POSIX::
ceil
(
$availableLoad
*
$analysis_stats
->
hive_capacity
);
my
$workerCount
=
POSIX::
ceil
(
$availableLoad
*
$analysis_stats
->
hive_capacity
);
$numWorkers
+=
$workerCount
;
$availableLoad
-=
$workerCount
*
(
1
/
$analysis_stats
->
hive_capacity
);
printf
("
%5d (%1.3f) use only %3d
",
$numWorkers
,
$availableLoad
,
$workerCount
);
...
...
Write
Preview
Markdown
is supported
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