diff --git a/apps/weather/src/sensors.py b/apps/weather/src/sensors.py index 37b7dde..3599759 100644 --- a/apps/weather/src/sensors.py +++ b/apps/weather/src/sensors.py @@ -39,9 +39,10 @@ def list_locations(context: dg.SensorEvaluationContext) -> dg.SensorResult: if new_locations: context.log.info(f"Discovered {len(new_locations)} new locations.") - # Limit to 3 new locations return dg.SensorResult( - run_requests=[], + run_requests=[ + dg.RunRequest(partition_key=location) for location in new_locations[:3] + ], dynamic_partitions_requests=[ location_partitions_def.build_add_request(new_locations), latitude_partitions_def.build_add_request(new_latitudes),