Skip to content

Commit

Permalink
C4-89 Always use S3BlobStorage (#138)
Browse files Browse the repository at this point in the history
* C4-89 always use S3BlobStorage

* C4-89 up minor version

* C4-89 use postgres if you really have to

* C4-89 take Kents suggestion
  • Loading branch information
willronchetti authored Mar 24, 2020
1 parent ae27398 commit fa3d68c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "dcicsnovault"
version = "2.0.3"
version = "2.0.4"
description = "Storage support for 4DN Data Portals."
authors = ["4DN-DCIC Team <[email protected]>"]
license = "MIT"
Expand Down
9 changes: 4 additions & 5 deletions snovault/storage.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

from pyramid.httpexceptions import (
HTTPConflict,
HTTPLocked,
Expand Down Expand Up @@ -99,10 +98,10 @@ def register_storage(registry, write_override=None, read_override=None):
_DBSESSION = registry[DBSESSION]

# set up blob storage if not configured already
if not registry.get(BLOBS) and registry.settings.get('blob_bucket'):
registry[BLOBS] = S3BlobStorage(registry.settings['blob_bucket'])
else:
registry[BLOBS] = RDBBlobStorage(registry[DBSESSION])
blob_bucket = registry.settings.get('blob_bucket', None)
registry[BLOBS] = (S3BlobStorage(blob_bucket)
if blob_bucket
else RDBBlobStorage(registry[DBSESSION]))


Base = declarative_base()
Expand Down

0 comments on commit fa3d68c

Please sign in to comment.