Skip to content

Commit

Permalink
Merge branch 'main' into 2699-de_filter-bad-page-navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
mlissner authored May 1, 2023
2 parents c4a2117 + e1c416d commit f0db7e1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,15 @@ def query_and_save_creditors_data(options: OptionsType) -> None:
)
if newly_enqueued:
throttle.maybe_wait()
query_and_save_list_of_creditors.delay(
query_and_save_list_of_creditors.si(
session.cookies,
court_id,
d_number_file_name,
docket_number,
html_file,
i,
row,
)
).set(queue=q).apply_async()
else:
logger.info(
f"The report {html_file} is currently being processed in "
Expand Down
7 changes: 4 additions & 3 deletions cl/corpus_importer/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -2198,9 +2198,10 @@ def query_and_save_list_of_creditors(

raw_data = report.data
pipe_limited_data = raw_data.get("data", "")
# Save report HTML in disk.
with open(pipe_limited_file, "w", encoding="utf-8") as file:
file.write(pipe_limited_data)
if pipe_limited_data:
# Save report HTML in disk.
with open(pipe_limited_file, "w", encoding="utf-8") as file:
file.write(pipe_limited_data)

if pipe_limited_data:
make_csv_file(pipe_limited_file, court_id, d_number_file_name)
Expand Down

0 comments on commit f0db7e1

Please sign in to comment.