Skip to content

Commit 4332085

Browse files
committed
Try larger chunk size again
1 parent 6da5452 commit 4332085

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

adscrawler/app_stores/scrape_stores.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def update_app_details(
132132
df = df.sort_values("country_code").reset_index(drop=True)
133133
logger.info(f"{log_info} start {len(df)} apps")
134134

135-
max_chunk_size = 1000
135+
max_chunk_size = 3000
136136
chunks = []
137137
# Try keeping countries together for larger end S3 files
138138
for _country, country_df in df.groupby("country_code"):
@@ -171,12 +171,9 @@ def update_app_details(
171171
try:
172172
_result = future.result()
173173
completed_count += 1
174-
if completed_count % 10 == 0 or completed_count == total_chunks:
175-
logger.info(
176-
f"Progress: {completed_count}/{total_chunks} chunks "
177-
f"({completed_count / total_chunks * 100:.1f}%) | "
178-
f"Failed: {failed_count}"
179-
)
174+
logger.info(
175+
f"{log_info} finished: {completed_count}/{total_chunks} failed: {failed_count}"
176+
)
180177
except Exception as e:
181178
failed_count += 1
182179
logger.exception(f"Chunk {chunk_idx} failed: {e}")

0 commit comments

Comments
 (0)