Replace storage backend 'pillar' with 'local'
The backend 'pillar' is obsolete; 'local' is the modernity and uses our nice storage API.
This commit is contained in:
parent
75e2402420
commit
2e2314c16b
@ -363,7 +363,7 @@ def generate_link(backend, file_path: str, project_id: str=None, is_public=False
|
||||
|
||||
return blob.get_url(is_public=is_public)
|
||||
|
||||
if backend == 'pillar':
|
||||
if backend == 'pillar': # obsolete, replace with local.
|
||||
return url_for('file_storage.index', file_name=file_path,
|
||||
_external=True, _scheme=current_app.config['SCHEME'])
|
||||
if backend == 'cdnsun':
|
||||
|
@ -16,7 +16,7 @@ node_type_storage = {
|
||||
'subdir': {
|
||||
'type': 'string',
|
||||
},
|
||||
# Which backend is used to store the files (gcs, pillar, bam, cdnsun)
|
||||
# Which backend is used to store the files (gcs, local)
|
||||
'backend': {
|
||||
'type': 'string',
|
||||
},
|
||||
|
@ -38,7 +38,7 @@ EXAMPLE_FILE = {'_id': ObjectId('5672e2c1c379cf0007b31995'),
|
||||
'_created': datetime.datetime(2015, 12, 17, 16, 28, 49, tzinfo=tz_util.utc),
|
||||
'md5': '',
|
||||
'file_path': 'c2a5c897769ce1ef0eb10f8fa1c472bcb8e2d5a4.png',
|
||||
'backend': 'pillar',
|
||||
'backend': 'local',
|
||||
'link': 'http://localhost:8002/file',
|
||||
'link_expires': datetime.datetime(2016, 3, 22, 9, 28, 22, tzinfo=tz_util.utc)}
|
||||
|
||||
|
@ -33,7 +33,7 @@ EXAMPLE_FILE = {
|
||||
'user': ObjectId('56264fc4fa3a250344bd10c5'),
|
||||
'content_type': 'image/png',
|
||||
'file_path': 'c2a5c897769ce1ef0eb10f8fa1c472bcb8e2d5a4.png',
|
||||
'backend': 'pillar',
|
||||
'backend': 'local',
|
||||
'link': 'http://localhost:8002/file',
|
||||
}
|
||||
|
||||
@ -58,7 +58,7 @@ class FileLinkCeleryTasksTest(AbstractPillarTest):
|
||||
'link_expires': now + datetime.timedelta(hours=1, minutes=57)})
|
||||
# Not same backend → ignore
|
||||
fid4, file_4 = self.ensure_file_exists({
|
||||
'backend': 'pillar',
|
||||
'backend': 'local',
|
||||
'link_expires': now + datetime.timedelta(hours=1, minutes=58)})
|
||||
# Same as fid3 → refresh
|
||||
fid5, _ = self.ensure_file_exists({
|
||||
|
Loading…
x
Reference in New Issue
Block a user