@@ -263,39 +263,3 @@ async def get_pilot_jobs(
263
263
status_code = status .HTTP_400_BAD_REQUEST ,
264
264
detail = "You must provide either pilot_stamp or job_id" ,
265
265
)
266
-
267
-
268
- @router .patch ("/jobs" , status_code = HTTPStatus .NO_CONTENT )
269
- async def add_jobs_to_pilot (
270
- pilot_db : PilotAgentsDB ,
271
- job_db : JobDB ,
272
- pilot_stamp : Annotated [str , Body (description = "The stamp of the pilot." )],
273
- job_ids : Annotated [
274
- list [int ], Body (description = "The jobs we want to add to the pilot." )
275
- ],
276
- check_permissions : CheckPilotManagementPolicyCallable ,
277
- ):
278
- """Endpoint only for admins, to associate a pilot with a job."""
279
- await check_permissions (
280
- action = ActionType .MANAGE_PILOTS ,
281
- pilot_db = pilot_db ,
282
- pilot_stamps = [pilot_stamp ],
283
- job_db = job_db ,
284
- job_ids = job_ids ,
285
- )
286
-
287
- try :
288
- await add_jobs_to_pilot_bl (
289
- pilot_db = pilot_db ,
290
- pilot_stamp = pilot_stamp ,
291
- job_ids = job_ids ,
292
- )
293
- except PilotNotFoundError as e :
294
- raise HTTPException (
295
- status_code = status .HTTP_400_BAD_REQUEST , detail = "This pilot does not exist."
296
- ) from e
297
- except PilotAlreadyAssociatedWithJobError as e :
298
- raise HTTPException (
299
- status_code = status .HTTP_409_CONFLICT ,
300
- detail = "This pilot is already associated with this job." ,
301
- ) from e
0 commit comments