Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
ensembl-gh-mirror
ensembl-hive
Commits
18417dbf
Commit
18417dbf
authored
Nov 26, 2013
by
Leo Gordon
Browse files
simplify logging of submission output/error streams
parent
b2155f15
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
scripts/beekeeper.pl
scripts/beekeeper.pl
+13
-0
No files found.
scripts/beekeeper.pl
View file @
18417dbf
...
...
@@ -13,6 +13,7 @@ BEGIN {
use
Getopt::
Long
;
use
File::
Path
'
make_path
';
use
Bio::EnsEMBL::Hive::
Utils
('
script_usage
',
'
destringify
');
use
Bio::EnsEMBL::Hive::Utils::
Config
;
use
Bio::EnsEMBL::Hive::DBSQL::
DBAdaptor
;
...
...
@@ -68,6 +69,7 @@ sub main {
$self
->
{'
hive_log_dir
'}
=
undef
;
$self
->
{'
submit_stdout_file
'}
=
undef
;
$self
->
{'
submit_stderr_file
'}
=
undef
;
$self
->
{'
submit_log_dir
'}
=
undef
;
GetOptions
(
# connection parameters
...
...
@@ -103,6 +105,7 @@ sub main {
'
debug=i
'
=>
\
$self
->
{'
debug
'},
'
submit_stdout_file=s
'
=>
\
$self
->
{'
submit_stdout_file
'},
'
submit_stderr_file=s
'
=>
\
$self
->
{'
submit_stderr_file
'},
'
submit_log_dir=s
'
=>
\
$self
->
{'
submit_log_dir
'},
# other commands/options
'
h|help
'
=>
\
$help
,
...
...
@@ -332,6 +335,11 @@ sub run_autonomously {
$meadow_type_rc_name2resource_param_list
{
$rd
->
meadow_type
()
}{
$rc_id2name
->
{
$rd
->
resource_class_id
}
}
=
[
$rd
->
submission_cmd_args
,
$rd
->
worker_cmd_args
];
}
if
(
$self
->
{'
submit_log_dir
'}
)
{
make_path
(
$self
->
{'
submit_log_dir
'}
);
}
my
$beekeeper_pid
=
$$
;
my
$iteration
=
0
;
my
$num_of_remaining_jobs
=
0
;
my
$failed_analyses
=
0
;
...
...
@@ -369,6 +377,11 @@ sub run_autonomously {
.
(
$special_task
?
''
:
"
-rc_name
$rc_name
")
.
(
defined
(
$worker_cmd_args
)
?
"
$worker_cmd_args
"
:
'');
if
(
$self
->
{'
submit_log_dir
'}
)
{
$self
->
{'
submit_stdout_file
'}
=
$self
->
{'
submit_log_dir
'}
.
"
/submit_
${beekeeper_pid}
_iter
${iteration}
_
${rc_name}
.out
";
$self
->
{'
submit_stderr_file
'}
=
$self
->
{'
submit_log_dir
'}
.
"
/submit_
${beekeeper_pid}
_iter
${iteration}
_
${rc_name}
.err
";
}
$this_meadow
->
submit_workers
(
$specific_worker_cmd
,
$this_meadow_rc_worker_count
,
$iteration
,
$rc_name
,
$submission_cmd_args
||
'',
$self
->
{'
submit_stdout_file
'},
$self
->
{'
submit_stderr_file
'});
...
...
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