@@ -619,7 +619,8 @@ def update_storage_shares(share_ids, project, experiment, dset, dtype, prefrac,
619619
620620 elif pre_alldss .exists ():
621621 # there is a live dss somewhere, get it onto an rsync source first
622- # This is VERY similar to what we do in home/views for mzml, except the local storage
622+ # This is VERY similar to what we do in home/views around L1050 and L1180
623+ # for mzml, except the local storage
623624 src_sfloc_ids = [x ['pk' ] for x in existing_sfl .filter (
624625 servershare = pre_alldss .first ().storageshare ,
625626 sfile__rawfile__datasetrawfile__dataset = dset ).values ('pk' )]
@@ -1151,6 +1152,7 @@ def purge_project(request):
11511152
11521153
11531154def get_dset_storestate (dset_id , ds_deleted ):
1155+ # For archiving, reactivating, and showing on homepage
11541156 '''Count SFLoc associated with a dataset (created when adding/removing), in different
11551157 servershares and in backup - return a state for the dataset (currently a string)'''
11561158 dsf_c = filemodels .StoredFile .objects .exclude (mzmlfile__isnull = False ).filter (
@@ -1298,7 +1300,9 @@ def reactivate_dataset(dset, share_ids, project, experiment, dtype, prefrac, hrr
12981300 sfls_inbox .update (path = buppath , active = True )
12991301
13001302 sflids = [x ['pk' ] for x in sfls_inbox .values ('pk' )]
1303+ # Queue restore job from backup
13011304 create_job ('reactivate_dataset' , dss_id = bupdss .pk , sfloc_ids = sflids )
1305+ # Now move from restored to other areas
13021306 if upd_stor_err := update_storage_shares (share_ids , project , experiment , dset ,
13031307 dtype , prefrac , hrrange , user_id ):
13041308 msg = json .loads (upd_stor_err .content )['error' ]
@@ -1757,7 +1761,6 @@ def save_or_update_files(data, user_id):
17571761 return {'error' : 'Cannot find some of the files asked to remove on storage. '
17581762 'This should not happen. Contact admin' }, 403
17591763
1760-
17611764 # Errors checked, now store DB records and queue move jobs
17621765 if added_fnids :
17631766 # First restore from backup
0 commit comments