Skip to content

Commit

Permalink
Merge branch 'main' into 4081-get-latest-cases-from-iquery-pages-daemon
Browse files Browse the repository at this point in the history
  • Loading branch information
ERosendo authored Jun 24, 2024
2 parents 68b32c6 + f1030bc commit e13a656
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions cl/corpus_importer/management/commands/make_aws_manifest_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,7 @@ def get_total_number_of_records(type: str, use_replica: bool = False) -> int:
SELECT count(*) AS exact_count
FROM audio_audio
WHERE
local_path_mp3 != '' AND
download_url != 'https://www.cadc.uscourts.gov/recordings/recordings.nsf/' AND
position('Unavailable' in download_url) = 0 AND
duration > 30
stt_status = 1
"""

with connections[
Expand Down Expand Up @@ -97,19 +94,8 @@ def get_custom_query(type: str, last_pk: str) -> tuple[str, list[Any]]:
)
case SEARCH_TYPES.ORAL_ARGUMENT:
base_query = "SELECT id from audio_audio"
no_argument_where_clause = """
WHERE local_path_mp3 != '' AND
download_url != 'https://www.cadc.uscourts.gov/recordings/recordings.nsf/' AND
position('Unavailable' in download_url) = 0 AND
duration > 30
"""
where_clause_with_argument = """
WHERE id > %s AND
local_path_mp3 != '' AND
download_url != 'https://www.cadc.uscourts.gov/recordings/recordings.nsf/' AND
position('Unavailable' in download_url) = 0 AND
duration > 30
"""
no_argument_where_clause = "WHERE stt_status = 1"
where_clause_with_argument = "WHERE id > %s AND stt_status = 1"
filter_clause = (
no_argument_where_clause
if not last_pk
Expand Down

0 comments on commit e13a656

Please sign in to comment.