@cryptotaxi247 / CoPilot / commits / 18736d25

refactor: set default values for batch size and max batches in create_alert_auto_route

taylorwalton committed Dec 4, 2025 at 09:17 UTC 18736d25bbd12b913a92dc2be1b5bd37411db6ce
1 file changed +3 -2
backend/app/incidents/routes/incident_alert.py
+3 -2
@@ -211,8 +211,6 @@ async def create_alert_manual_route(
211 description="Is invoked by the scheduler to create an incident alert in CoPilot",
212 )
213 async def create_alert_auto_route(
214 - batch_size: int = Query(default=100, ge=10, le=500, description="Number of alerts to process per batch"),
215 - max_batches: int = Query(default=10, ge=1, le=50, description="Maximum number of batches to process in one run"),
214 session: AsyncSession = Depends(get_db),
215 ) -> AutoCreateAlertResponse:
216 """
@@ -230,6 +228,9 @@ async def create_alert_auto_route(
228 Returns:
229 AutoCreateAlertResponse: The response object containing the result of the alert creation.
230 """
231 + batch_size = 100 # Number of alerts to process per batch
232 + max_batches = 10 # Maximum number of batches to process in one scheduler run
233 +
234 total_created = 0
235 total_failed = 0
236 batches_processed = 0