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
c0381e5c
Commit
c0381e5c
authored
Oct 16, 2014
by
Leo Gordon
Browse files
bugfix: prevent scheduling a negative number of Workers
parent
4d5985df
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
modules/Bio/EnsEMBL/Hive/Limiter.pm
modules/Bio/EnsEMBL/Hive/Limiter.pm
+2
-0
No files found.
modules/Bio/EnsEMBL/Hive/Limiter.pm
View file @
c0381e5c
...
...
@@ -90,6 +90,8 @@ sub preliminary_offer {
if
(
defined
(
$available_capacity
)
and
defined
(
$multiplier
)
and
(
$multiplier
>=
0.0
)
)
{
# if multiplier is negative it is not limiting
$available_capacity
=
0
if
(
$available_capacity
<
0
);
my
$product
=
$available_capacity
*
$multiplier
;
my
$slots_available
=
int
(
"
$product
"
);
# stringification helps to round up things like 0.1*10 (instead of leaving them at 0.99999999)
...
...
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