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
0c15bb1b
Commit
0c15bb1b
authored
Jun 26, 2012
by
Leo Gordon
Browse files
fixed and cleaned up the code that outputs a list of workers
parent
f270555b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
41 deletions
+30
-41
modules/Bio/EnsEMBL/Hive/Worker.pm
modules/Bio/EnsEMBL/Hive/Worker.pm
+23
-14
scripts/beekeeper.pl
scripts/beekeeper.pl
+7
-27
No files found.
modules/Bio/EnsEMBL/Hive/Worker.pm
View file @
0c15bb1b
...
...
@@ -407,20 +407,29 @@ sub perform_cleanup {
}
sub
print_worker
{
my
$self
=
shift
;
print
("
WORKER: worker_id=
",
$self
->
dbID
,
"
analysis_id=(
",
$self
->
analysis
->
dbID
,"
)
",
$self
->
analysis
->
logic_name
,
"
host=
",
$self
->
host
,
"
pid=
",
$self
->
process_id
,
"
\n
");
print
("
\t
batch_size =
",
$self
->
analysis
->
stats
->
get_or_estimate_batch_size
(),"
\n
");
print
("
\t
job_limit =
",
$self
->
job_limit
,"
\n
")
if
(
defined
(
$self
->
job_limit
));
print
("
\t
life_span =
",
$self
->
life_span
,"
\n
")
if
(
defined
(
$self
->
life_span
));
if
(
my
$worker_output_dir
=
$self
->
worker_output_dir
)
{
print
("
\t
worker_output_dir =
$worker_output_dir
\n
");
}
else
{
print
("
\t
worker_output_dir = STDOUT/STDERR
\n
");
}
my
$self
=
shift
;
print
$self
->
toString
()
.
"
\n
";
print
("
\t
batch_size =
",
$self
->
analysis
->
stats
->
get_or_estimate_batch_size
(),"
\n
");
print
("
\t
job_limit =
",
$self
->
job_limit
,"
\n
")
if
(
defined
(
$self
->
job_limit
));
print
("
\t
life_span =
",
$self
->
life_span
,"
\n
")
if
(
defined
(
$self
->
life_span
));
if
(
my
$worker_output_dir
=
$self
->
worker_output_dir
)
{
print
("
\t
worker_output_dir =
$worker_output_dir
\n
");
}
else
{
print
("
\t
worker_output_dir = STDOUT/STDERR
\n
");
}
}
sub
toString
{
my
$self
=
shift
@_
;
return
"
Worker:
\t
"
.
join
('
,
',
'
analysis=
'
.
$self
->
analysis
->
logic_name
.
'
(
'
.
$self
->
analysis
->
dbID
.
'
)
',
'
meadow=
'
.
$self
->
meadow_type
.
'
/
'
.
$self
->
meadow_name
,
'
process=
'
.
$self
->
process_id
.
'
@
'
.
$self
->
host
,
'
last_check_in=
'
.
$self
->
last_check_in
,
);
}
...
...
scripts/beekeeper.pl
View file @
0c15bb1b
...
...
@@ -242,7 +242,13 @@ sub main {
$queen
->
print_analysis_status
(
$analysis
)
unless
(
$self
->
{'
no_analysis_stats
'});
$queen
->
print_running_worker_status
;
show_running_workers
(
$self
,
$queen
)
if
(
$show_worker_stats
);
if
(
$show_worker_stats
)
{
print
("
===== List of live Workers according to the Queen: ======
\n
");
foreach
my
$worker
(
@
{
$queen
->
fetch_overdue_workers
(
0
)
})
{
print
$worker
->
toString
()
.
"
\n
";
}
print
"
\n
";
}
$queen
->
schedule_workers
(
$analysis
);
# show what would be submitted, but do not actually submit
$queen
->
get_remaining_jobs_show_hive_progress
();
...
...
@@ -271,32 +277,6 @@ sub main {
#######################
# --------------[worker reports]--------------------
sub
show_given_workers
{
my
(
$self
,
$worker_list
,
$verbose_stats
)
=
@_
;
foreach
my
$worker
(
@
{
$worker_list
})
{
printf
("
%10d %35s(%5d) %5s:%15s %15s (%s)
\n
",
$worker
->
dbID
,
$worker
->
analysis
->
logic_name
,
$worker
->
analysis
->
dbID
,
$worker
->
beekeeper
,
$worker
->
process_id
,
$worker
->
host
,
$worker
->
last_check_in
);
printf
("
%s
\n
",
$worker
->
worker_output_dir
)
if
(
$verbose_stats
);
}
}
sub
show_running_workers
{
my
(
$self
,
$queen
)
=
@_
;
print
("
===== running workers
\n
");
show_given_workers
(
$self
,
$queen
->
fetch_overdue_workers
(
0
),
$queen
->
{'
verbose_stats
'});
}
sub
generate_worker_cmd
{
my
(
$self
,
$run_job_id
)
=
@_
;
...
...
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