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
Commits
ca4996ad
Commit
ca4996ad
authored
Oct 07, 2009
by
Steve Trevanion
Browse files
bug fix to stop blast going bad
parent
acdb6fbf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
modules/Bio/EnsEMBL/External/BlastAdaptor.pm
modules/Bio/EnsEMBL/External/BlastAdaptor.pm
+9
-5
No files found.
modules/Bio/EnsEMBL/External/BlastAdaptor.pm
View file @
ca4996ad
...
...
@@ -938,10 +938,13 @@ SELECT ticket
FROM blast_ticket
WHERE update_time < SUBDATE( NOW(), INTERVAL $days DAY ) /
;
my
$sth
=
$self
->
dbc
->
db_handle
->
prepare
(
$q
);
my
$rv
=
$sth
->
execute
()
||
$self
->
throw
(
$sth
->
errstr
);
my
$res
=
$sth
->
fetchall_arrayref
;
$sth
->
finish
;
#need to dort this bit - use and a loop and "Delete ... limit 1000" to prevent tying up the database
# my $sth = $self->dbc->db_handle->prepare($q);
# my $rv = $sth->execute() || $self->throw( $sth->errstr );
# my $res = $sth->fetchall_arrayref;
# $sth->finish;
# Delete result and ticket rows associated with old tickets
# my $q_del_tmpl = qq/
...
...
@@ -980,8 +983,9 @@ WHERE update_time < SUBDATE( NOW(), INTERVAL $days DAY ) /;
my
$table_name
=
$row
->
[
0
];
## table name
my
$num_rows
=
$row
->
[
4
];
## # Rows...
my
$update_time
=
$row
->
[
12
];
## update time --- Should be a string like 2003-08-15 10:36:56
next
unless
$update_time
;
#cope with an occasional innodb table that has no update time
my
@time
=
split
(
/[-:\s]/
,
$update_time
);
my
$epoch_then
=
timelocal
(
$time
[
5
],
$time
[
4
],
$time
[
3
],
$time
[
2
],
$time
[
1
]
-
1
,
$time
[
0
]
-
1900
);
my
$secs_old
=
time
()
-
$epoch_then
;
...
...
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