Skip to content

Commit

Permalink
Merge pull request freelawproject#4289 from freelawproject/4280-free-…
Browse files Browse the repository at this point in the history
…pacer-downloads-attributeerror-bool-object-has-no-attribute-startswith

Correct do_everything function used in pacer free documents command
  • Loading branch information
quevon24 authored Aug 8, 2024
2 parents c7d7078 + 459084b commit 9434e39
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ def ocr_available(queue: str, index: bool) -> None:
.order_by()
)
count = rds.count()
logger.info(f"Total documents requiring OCR: {count}")
throttle = CeleryThrottle(queue_name=q)
for i, pk in enumerate(rds):
throttle.maybe_wait()
Expand Down Expand Up @@ -360,7 +361,7 @@ def do_everything(courts, date_start, date_end, index, queue):
logger.info("Getting PDFs from free document reports")
get_pdfs(courts, date_start, date_end, index, queue)
logger.info("Doing OCR and saving items to Solr.")
ocr_available(index, queue)
ocr_available(queue, index)


class Command(VerboseCommand):
Expand Down

0 comments on commit 9434e39

Please sign in to comment.