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
635dd4f3
Commit
635dd4f3
authored
Feb 24, 2015
by
Leo Gordon
Browse files
bugfix: be more specific when counting locally-running workers
parent
d9d2c7c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
modules/Bio/EnsEMBL/Hive/Meadow/LOCAL.pm
modules/Bio/EnsEMBL/Hive/Meadow/LOCAL.pm
+10
-2
No files found.
modules/Bio/EnsEMBL/Hive/Meadow/LOCAL.pm
View file @
635dd4f3
...
...
@@ -56,10 +56,18 @@ sub count_pending_workers_by_rc_name {
}
sub
_command_line_to_extract_all_running_workers
{
my
(
$self
)
=
@_
;
# Make sure we have excluded both 'awk' itself and commands like "less runWorker.pl" :
return
q{ps x -o state,pid,command -w -w | awk '(/runWorker.pl/ && ($3 ~ /perl$/) )'}
;
}
sub
count_running_workers
{
my
$self
=
shift
@_
;
my
$cmd
=
'
ps x | grep runWorker.pl | grep -v "grep runWorker.pl"
| wc -l
';
my
$cmd
=
$self
->
_command_line_to_extract_all_running_workers
.
'
| wc -l
';
my
$run_count
=
qx/$cmd/
;
chomp
(
$run_count
);
...
...
@@ -70,7 +78,7 @@ sub count_running_workers {
sub
status_of_all_our_workers
{
# returns a hashref
my
(
$self
)
=
@_
;
my
$cmd
=
'
ps x -o state,pid,command -w -w | grep runWorker.pl | grep -v "grep runWorker.pl"
'
;
my
$cmd
=
$self
->
_command_line_to_extract_all_running_workers
;
# FIXME: if we want to incorporate Meadow->pipeline_name() filtering here,
# a dummy parameter to the runWorker.pl should probably be introduced
...
...
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