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
e249808dc6cc
Commit
e249808dc6cc
authored
1 year ago
by
Fabien Amarger
Browse files
Options
Downloads
Patches
Plain Diff
feat: Store file into S3Storage
parent
b893a44aee69
No related branches found
No related tags found
1 merge request
!16
Log import_data to S3 storage
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cubicweb_rodolf/__pkginfo__.py
+1
-0
1 addition, 0 deletions
cubicweb_rodolf/__pkginfo__.py
cubicweb_rodolf/hooks.py
+12
-0
12 additions, 0 deletions
cubicweb_rodolf/hooks.py
with
13 additions
and
0 deletions
cubicweb_rodolf/__pkginfo__.py
+
1
−
0
View file @
e249808d
...
...
@@ -17,6 +17,7 @@
"
cubicweb-api
"
:
"
>= 0.14.0,< 0.15.0
"
,
"
cubicweb-file
"
:
"
>= 4.1.0, < 5.0.0
"
,
"
cubicweb-rq
"
:
None
,
"
cubicweb-s3storage
"
:
None
,
"
requests
"
:
None
,
"
pyshacl
"
:
None
,
"
Jinja2
"
:
None
,
...
...
This diff is collapsed.
Click to expand it.
cubicweb_rodolf/hooks.py
+
12
−
0
View file @
e249808d
...
...
@@ -16,3 +16,15 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
cubicweb-rodolf specific hooks and operations
"""
from
cubicweb.server.hook
import
Hook
from
cubicweb_s3storage.storages
import
S3Storage
class
S3StorageStartupHook
(
Hook
):
__regid__
=
"
rodolf.server-startup-hook
"
events
=
(
"
server_startup
"
,
"
server_maintenance
"
)
def
__call__
(
self
):
storage
=
S3Storage
(
"
rodolf
"
)
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