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
Commits
7ea9ab0f
Commit
7ea9ab0f
authored
Apr 01, 2009
by
Web Admin
Browse files
from vega-49-dev
parent
a800223e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
1 deletion
+34
-1
modules/Bio/EnsEMBL/External/BlastAdaptor.pm
modules/Bio/EnsEMBL/External/BlastAdaptor.pm
+34
-1
No files found.
modules/Bio/EnsEMBL/External/BlastAdaptor.pm
View file @
7ea9ab0f
...
...
@@ -389,7 +389,7 @@ sub store_search_multi{
$sth
->
execute
(
$frozen
,
$ticket
)
||
$self
->
throw
(
$sth
->
errstr
);
$sth
->
finish
;
}
my
$sth
=
$self
->
prepare
('
show tables
');
$sth
->
execute
();
$sth
->
finish
;
$sth
=
$self
->
prepare
('
show tables
');
$sth
->
execute
();
$sth
->
finish
;
return
$search_multi
->
token
();
}
...
...
@@ -1137,4 +1137,37 @@ sub rotate_daily_tables {
}
#----------------------------------------------------------------------
=head2 cleanup_processes
Arg [1] : none
Function : Kills any sleeping processes older that 1000
Returntype: boolean
Exceptions:
Caller :
Example :
=cut
sub
cleanup_processes
{
my
$self
=
shift
;
my
$dbh
=
$self
->
dbc
->
db_handle
;
my
$sth
=
$self
->
prepare
(
'
show processlist
'
);
my
$kill_sth
=
$self
->
prepare
('
kill ?
');
$sth
->
execute
;
my
$res
=
$sth
->
fetchall_arrayref
([
0
,
3
,
4
,
5
]);
my
$c
=
0
;
foreach
my
$ps
(
@$res
)
{
my
(
$pid
,
$db
,
$stat
,
$time
)
=
@$ps
;
if
(
$db
eq
'
ensembl_blast
')
{
if
(
(
$stat
eq
'
Sleep
')
&&
(
$time
>
1000
)
)
{
$kill_sth
->
execute
(
$pid
);
$c
++
;
}
}
}
warn
"
Killed
$c
processes
";
return
1
;
}
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