@@ -226,7 +226,7 @@ async def add_custom_storage(
226226 async def remove_custom_storage (
227227 self , name : str , org : Organization
228228 ) -> dict [str , bool ]:
229- """remove custom storage"""
229+ """Remove custom storage from org """
230230 if org .storage .custom and org .storage .name == name :
231231 raise HTTPException (status_code = 400 , detail = "storage_in_use" )
232232
@@ -253,7 +253,7 @@ async def update_storage_ref(
253253 org : Organization ,
254254 background_tasks : BackgroundTasks ,
255255 ) -> dict [str , Union [bool , Optional [str ]]]:
256- """update storage for org"""
256+ """Update storage for org"""
257257 storage_ref = storage_refs .storage
258258
259259 try :
@@ -291,9 +291,6 @@ async def update_storage_ref(
291291 org , prev_storage_ref , storage_ref
292292 )
293293
294- # This runs only two update_many mongo commands, so should be safe to run
295- # in a FastAPI background task rather than requiring a full Browsertrix
296- # Background job
297294 background_tasks .add_task (
298295 self ._run_post_storage_update_tasks ,
299296 org ,
@@ -322,7 +319,7 @@ async def update_storage_replica_refs(
322319 org : Organization ,
323320 background_tasks : BackgroundTasks ,
324321 ) -> dict [str , bool ]:
325- """update storage for org"""
322+ """Update replica storage for org"""
326323
327324 replicas = storage_refs .storageReplicas
328325
@@ -352,11 +349,6 @@ async def update_storage_replica_refs(
352349
353350 await self .org_ops .update_storage_refs (org , replicas = True )
354351
355- # This only kicks off background jobs and runs a few update_many mongo
356- # commands, so it might be fine to keep as a FastAPI background job.
357- # Consider moving to a Browsertrix background job, but that may make
358- # retrying difficult as the job which would be retried also kicks off
359- # other background jobs which may have been successful already
360352 background_tasks .add_task (
361353 self ._run_post_storage_replica_update_tasks ,
362354 org ,
0 commit comments