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
5c756354
Commit
5c756354
authored
Mar 19, 2015
by
Matthieu Muffato
Browse files
Moved the interpretation of the command's status to write_output()
parent
de8ff48f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
modules/Bio/EnsEMBL/Hive/RunnableDB/SystemCmd.pm
modules/Bio/EnsEMBL/Hive/RunnableDB/SystemCmd.pm
+14
-4
No files found.
modules/Bio/EnsEMBL/Hive/RunnableDB/SystemCmd.pm
View file @
5c756354
...
...
@@ -132,20 +132,30 @@ sub run {
};
$self
->
dbc
and
$self
->
dbc
->
disconnect_when_inactive
(
0
);
# allow the worker to keep the connection open again
if
(
$return_value
)
{
die
sprintf
(
"
'%s' resulted in an error code=%d
\n
stderr is: %s
\n
",
$flat_cmd
,
$return_value
,
$stderr
);
}
# To be used in write_output()
$self
->
param
('
return_value
',
$return_value
);
$self
->
param
('
stderr
',
$stderr
);
$self
->
param
('
flat_cmd
',
$flat_cmd
);
}
=head2 write_output
Description : Implements write_output() interface method of Bio::EnsEMBL::Hive::Process that is used to deal with job's output after the execution.
Here we
have nothing to do, as the wrapper is very generic
.
Here we
take actions based on the command's exit status
.
=cut
sub
write_output
{
my
$self
=
shift
;
my
$return_value
=
$self
->
param
('
return_value
');
my
$stderr
=
$self
->
param
('
stderr
');
my
$flat_cmd
=
$self
->
param
('
flat_cmd
');
if
(
$return_value
)
{
die
sprintf
(
"
'%s' resulted in an error code=%d
\n
stderr is: %s
\n
",
$flat_cmd
,
$return_value
,
$stderr
);
}
}
1
;
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