Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Rodolf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cubicweb
cubes
Rodolf
Commits
2b16bfc82a93
Commit
2b16bfc82a93
authored
1 year ago
by
Fabien Amarger
Browse files
Options
Downloads
Patches
Plain Diff
feat(s3): Use var env to define which S3 bucket to use
parent
429cd6afe879
No related branches found
No related tags found
1 merge request
!16
Log import_data to S3 storage
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cubicweb_rodolf/hooks.py
+2
-1
2 additions, 1 deletion
cubicweb_rodolf/hooks.py
with
2 additions
and
1 deletion
cubicweb_rodolf/hooks.py
+
2
−
1
View file @
2b16bfc8
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
cubicweb-rodolf specific hooks and operations
"""
"""
cubicweb-rodolf specific hooks and operations
"""
import
os
from
cubicweb.server.hook
import
Hook
from
cubicweb.server.hook
import
Hook
from
cubicweb_s3storage.storages
import
S3Storage
from
cubicweb_s3storage.storages
import
S3Storage
...
@@ -26,5 +27,5 @@
...
@@ -26,5 +27,5 @@
events
=
(
"
server_startup
"
,
"
server_maintenance
"
)
events
=
(
"
server_startup
"
,
"
server_maintenance
"
)
def
__call__
(
self
):
def
__call__
(
self
):
storage
=
S3Storage
(
"
rodolf
"
)
storage
=
S3Storage
(
os
.
environ
.
get
(
"
RODOLF_S3_BUCKET
"
,
"
rodolf
"
)
)
self
.
repo
.
system_source
.
set_storage
(
"
File
"
,
"
data
"
,
storage
)
self
.
repo
.
system_source
.
set_storage
(
"
File
"
,
"
data
"
,
storage
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment