Fix tfl
This commit is contained in:
parent
6b1539a3e7
commit
6f28fa9d2a
3 changed files with 3 additions and 3 deletions
|
|
@ -66,7 +66,7 @@ def main():
|
||||||
pl.lit(f"{journey_time[:2]}:{journey_time[2:]}").alias("journey_time"),
|
pl.lit(f"{journey_time[:2]}:{journey_time[2:]}").alias("journey_time"),
|
||||||
)
|
)
|
||||||
|
|
||||||
successful = results_df.filter(pl.col("cycling").is_not_null()).height
|
successful = results_df.filter(pl.col("cycling_minutes").is_not_null()).height
|
||||||
print(f"Completed: {successful}/{len(results)} successful")
|
print(f"Completed: {successful}/{len(results)} successful")
|
||||||
|
|
||||||
parquet_path = save_results(results_df, destination.name)
|
parquet_path = save_results(results_df, destination.name)
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ DATA_DIR = Path("./data_sources")
|
||||||
OUTPUT_DIR = DATA_DIR / "processed"
|
OUTPUT_DIR = DATA_DIR / "processed"
|
||||||
|
|
||||||
MAX_DELAY = 10
|
MAX_DELAY = 10
|
||||||
REQUESTS_PER_MIN = 50
|
REQUESTS_PER_MIN = 500
|
||||||
MAX_POSTCODES = 100 # Set to None to process all postcodes
|
MAX_POSTCODES = 100 # Set to None to process all postcodes
|
||||||
MAX_CONCURRENT = 5
|
MAX_CONCURRENT = 5
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ class RateLimiter:
|
||||||
warnings.warn(
|
warnings.warn(
|
||||||
f"Rate limit reached ({REQUESTS_PER_MIN}/min), "
|
f"Rate limit reached ({REQUESTS_PER_MIN}/min), "
|
||||||
f"waiting {wait_time:.1f}s",
|
f"waiting {wait_time:.1f}s",
|
||||||
stacklevel=2,
|
stacklevel=1,
|
||||||
)
|
)
|
||||||
await asyncio.sleep(wait_time)
|
await asyncio.sleep(wait_time)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue