@@ -281,7 +281,7 @@ def _drop_and_rebuild_db() -> None:
281281
282282
283283@timeit
284- def transfer_all (metrics , limit = 100 , profile_waterlevels : bool = True ) :
284+ def transfer_all (metrics : Metrics ) -> list [ ProfileArtifact ] :
285285 message ("STARTING TRANSFER" , new_line_at_top = False )
286286 if get_bool_env ("DROP_AND_REBUILD_DB" , False ):
287287 logger .info ("Dropping schema and rebuilding database from migrations" )
@@ -300,7 +300,7 @@ def transfer_all(metrics, limit=100, profile_waterlevels: bool = True):
300300 for field in transfer_options .__dataclass_fields__
301301 },
302302 )
303-
303+ limit = int ( os . getenv ( "TRANSFER_LIMIT" , 1000 ))
304304 flags = {"TRANSFER_ALL_WELLS" : True , "LIMIT" : limit }
305305 message ("TRANSFER_FLAGS" )
306306 logger .info (flags )
@@ -313,9 +313,7 @@ def transfer_all(metrics, limit=100, profile_waterlevels: bool = True):
313313 # =========================================================================
314314 if continuous_water_levels_only :
315315 logger .info ("CONTINUOUS_WATER_LEVELS set; running only continuous transfers" )
316- _run_continuous_water_level_transfers (
317- metrics , flags , profile_waterlevels , profile_artifacts
318- )
316+ _run_continuous_water_level_transfers (metrics , flags )
319317 return profile_artifacts
320318 else :
321319 message ("PHASE 1: FOUNDATIONAL TRANSFERS (PARALLEL)" )
@@ -631,13 +629,9 @@ def main():
631629 "Set POSTGRES_DB=ocotilloapi_dev in .env file"
632630 )
633631
634- limit = int (os .getenv ("TRANSFER_LIMIT" , 1000 ))
635- profile_waterlevels = get_bool_env ("PROFILE_WATERLEVELS_CONTINUOUS" , True )
636632 metrics = Metrics ()
637633
638- profile_artifacts = transfer_all (
639- metrics , limit = limit , profile_waterlevels = profile_waterlevels
640- )
634+ profile_artifacts = transfer_all (metrics )
641635
642636 if get_bool_env ("CLEANUP_LOCATIONS" , True ):
643637 message ("CLEANING UP LOCATIONS" )
0 commit comments