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
41f97b37
Commit
41f97b37
authored
Aug 18, 2011
by
Leo Gordon
Browse files
show query/cmd/filename when debug is on
parent
a1a53d6d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
0 deletions
+14
-0
modules/Bio/EnsEMBL/Hive/RunnableDB/JobFactory.pm
modules/Bio/EnsEMBL/Hive/RunnableDB/JobFactory.pm
+6
-0
modules/Bio/EnsEMBL/Hive/RunnableDB/SqlCmd.pm
modules/Bio/EnsEMBL/Hive/RunnableDB/SqlCmd.pm
+4
-0
modules/Bio/EnsEMBL/Hive/RunnableDB/SystemCmd.pm
modules/Bio/EnsEMBL/Hive/RunnableDB/SystemCmd.pm
+4
-0
No files found.
modules/Bio/EnsEMBL/Hive/RunnableDB/JobFactory.pm
View file @
41f97b37
...
...
@@ -205,6 +205,9 @@ sub _get_rows_from_list {
sub
_get_rows_from_query
{
my
(
$self
,
$inputquery
)
=
@_
;
if
(
$self
->
debug
())
{
warn
qq{inputquery = "$inputquery"\n}
;
}
my
@rows
=
();
my
$sth
=
$self
->
dbh
()
->
prepare
(
$inputquery
);
$sth
->
execute
();
...
...
@@ -228,6 +231,9 @@ sub _get_rows_from_query {
sub
_get_rows_from_open
{
my
(
$self
,
$input_file_or_pipe
,
$delimiter
,
$parse_header
)
=
@_
;
if
(
$self
->
debug
())
{
warn
qq{input_file_or_pipe = "$input_file_or_pipe"\n}
;
}
my
@rows
=
();
open
(
FILE
,
$input_file_or_pipe
)
or
die
"
Could not open '
$input_file_or_pipe
' because: $!
";
while
(
my
$line
=
<
FILE
>
)
{
...
...
modules/Bio/EnsEMBL/Hive/RunnableDB/SqlCmd.pm
View file @
41f97b37
...
...
@@ -108,6 +108,10 @@ sub run {
# Perform parameter substitution:
my
$sql
=
$self
->
param_substitute
(
$unsubst_sql
);
if
(
$self
->
debug
())
{
warn
qq{sql = "$sql"\n}
;
}
$dbh
->
do
(
$sql
)
or
die
"
Could not run '
$sql
':
"
.
$dbh
->
errstr
;
my
$insert_id_name
=
'
_insert_id_
'
.
$counter
++
;
...
...
modules/Bio/EnsEMBL/Hive/RunnableDB/SystemCmd.pm
View file @
41f97b37
...
...
@@ -108,6 +108,10 @@ sub run {
my
$cmd
=
$self
->
param
('
cmd
');
if
(
$self
->
debug
())
{
warn
qq{cmd = "$cmd"\n}
;
}
$self
->
dbc
and
$self
->
dbc
->
disconnect_when_inactive
(
1
);
# release this connection for the duration of system() call
if
(
my
$return_value
=
system
(
$cmd
))
{
...
...
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