##// END OF EJS Templates
file-store: log miss store files better
marcink -
r3916:3561f4ad default
parent child Browse files
Show More
@@ -91,6 +91,9 b' class LocalFileStorage(object):'
91 self.base_path = base_path
91 self.base_path = base_path
92 self.extensions = resolve_extensions([], groups=extension_groups)
92 self.extensions = resolve_extensions([], groups=extension_groups)
93
93
94 def __repr__(self):
95 return '{}@{}'.format(self.__class__, self.base_path)
96
94 def store_path(self, filename):
97 def store_path(self, filename):
95 """
98 """
96 Returns absolute file path of the filename, joined to the
99 Returns absolute file path of the filename, joined to the
@@ -106,7 +106,9 b' class FileStoreView(BaseAppView):'
106 log.debug('Requesting FID:%s from store %s', file_uid, self.storage)
106 log.debug('Requesting FID:%s from store %s', file_uid, self.storage)
107
107
108 if not self.storage.exists(file_uid):
108 if not self.storage.exists(file_uid):
109 log.debug('File with FID:%s not found in the store', file_uid)
109 store_path = self.storage.store_path(file_uid)
110 log.debug('File with FID:%s not found in the store under `%s`',
111 file_uid, store_path)
110 raise HTTPNotFound()
112 raise HTTPNotFound()
111
113
112 db_obj = FileStore().query().filter(FileStore.file_uid == file_uid).scalar()
114 db_obj = FileStore().query().filter(FileStore.file_uid == file_uid).scalar()
General Comments 0
You need to be logged in to leave comments. Login now