Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
s3storage
Commits
4d9b29901e72
Commit
8162bb1e
authored
Feb 23, 2021
by
Elouan Martinet
Browse files
[storages] Skip already consumed keys in upload postcommit event
parent
5fea5d55bd6f
Pipeline
#36568
failed with stage
in 1 minute and 34 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
cubicweb_s3storage/storages.py
View file @
4d9b2990
...
...
@@ -186,7 +186,11 @@ class S3AddFileOp(DataOperationMixIn, LateOperation):
containercls
=
list
def
postcommit_event
(
self
):
consumed_keys
=
set
()
for
storage
,
key
,
eid
,
attr
in
self
.
get_data
():
if
key
in
consumed_keys
:
continue
consumed_keys
.
add
(
key
)
suffixed_key
=
storage
.
suffixed_key
(
key
)
storage
.
s3cnx
.
copy_object
(
Bucket
=
storage
.
bucket
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment