Skip to content

Commit

Permalink
example + one of its saved runs should no longer overwrite each other
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderGi committed Jun 29, 2024
1 parent 142f14c commit e0aa41e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion recipes/BulkRunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ def run_v2(
rec_ix = len(out_recs)
out_recs.extend(in_recs[df_ix : df_ix + arr_len])

used_col_names = set()
for url_ix, request_body, page_cls, sr, pr in build_requests_for_df(
df, request, df_ix, arr_len
):
Expand Down Expand Up @@ -333,8 +334,13 @@ def run_v2(

for field, col in request.output_columns.items():
if len(request.run_urls) > 1:
if pr and pr.title:
if (
pr
and pr.title
and f"({pr.title}) {col}" not in used_col_names
):
col = f"({pr.title}) {col}"
used_col_names.add(col)
else:
col = f"({url_ix + 1}) {col}"
out_val = state.get(field)
Expand Down

0 comments on commit e0aa41e

Please sign in to comment.