@@ -226,7 +226,7 @@ async def add_custom_storage(
226
226
async def remove_custom_storage (
227
227
self , name : str , org : Organization
228
228
) -> dict [str , bool ]:
229
- """remove custom storage"""
229
+ """Remove custom storage from org """
230
230
if org .storage .custom and org .storage .name == name :
231
231
raise HTTPException (status_code = 400 , detail = "storage_in_use" )
232
232
@@ -253,7 +253,7 @@ async def update_storage_ref(
253
253
org : Organization ,
254
254
background_tasks : BackgroundTasks ,
255
255
) -> dict [str , Union [bool , Optional [str ]]]:
256
- """update storage for org"""
256
+ """Update storage for org"""
257
257
storage_ref = storage_refs .storage
258
258
259
259
try :
@@ -291,9 +291,6 @@ async def update_storage_ref(
291
291
org , prev_storage_ref , storage_ref
292
292
)
293
293
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
297
294
background_tasks .add_task (
298
295
self ._run_post_storage_update_tasks ,
299
296
org ,
@@ -322,7 +319,7 @@ async def update_storage_replica_refs(
322
319
org : Organization ,
323
320
background_tasks : BackgroundTasks ,
324
321
) -> dict [str , bool ]:
325
- """update storage for org"""
322
+ """Update replica storage for org"""
326
323
327
324
replicas = storage_refs .storageReplicas
328
325
@@ -352,11 +349,6 @@ async def update_storage_replica_refs(
352
349
353
350
await self .org_ops .update_storage_refs (org , replicas = True )
354
351
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
360
352
background_tasks .add_task (
361
353
self ._run_post_storage_replica_update_tasks ,
362
354
org ,
0 commit comments