From eb419e8ba34f64ff1fbc3278b873240bc6e95eb6 Mon Sep 17 00:00:00 2001 From: "Kacper Kowalik (Xarthisius)" Date: Tue, 26 Jan 2021 13:50:51 -0600 Subject: [PATCH] Remove obsolete folderId and narrative handling --- gwvolman/tasks.py | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/gwvolman/tasks.py b/gwvolman/tasks.py index 71eb2392..2b45cbd9 100644 --- a/gwvolman/tasks.py +++ b/gwvolman/tasks.py @@ -62,16 +62,6 @@ def create_volume(self, instance_id): mountpoint = volume.attrs['Mountpoint'] logging.info("Mountpoint: %s", mountpoint) - try: - self.girder_client.downloadFolderRecursive( - tale['narrativeId'], HOSTDIR + mountpoint) - except KeyError: - pass # no narrativeId - except girder_client.HttpError: - logging.warn("Narrative folder not found for tale: %s", - str(tale['_id'])) - pass - os.chown(HOSTDIR + mountpoint, DEFAULT_USER, DEFAULT_GROUP) for root, dirs, files in os.walk(HOSTDIR + mountpoint): for obj in dirs + files: @@ -105,17 +95,6 @@ def create_volume(self, instance_id): if tale.get('dataSet') is not None: session = self.girder_client.post( '/dm/session', parameters={'taleId': tale['_id']}) - elif tale.get('folderId'): # old format, keep it for now - data_set = [ - {'itemId': folder['_id'], 'mountPath': '/' + folder['name']} - for folder in self.girder_client.listFolder(tale['folderId']) - ] - data_set += [ - {'itemId': item['_id'], 'mountPath': '/' + item['name']} - for item in self.girder_client.listItem(tale['folderId']) - ] - session = self.girder_client.post( - '/dm/session', parameters={'dataSet': json.dumps(data_set)}) else: session = {'_id': None}