-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed deleting expired items that have pending asset uploads #488
base: develop
Are you sure you want to change the base?
Conversation
18dfb6b
to
352c3c0
Compare
352c3c0
to
60d2423
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Some minor details, nothing that is blocking.
def __init__(self, *args, **kwargs): | ||
|
||
s3_bucket = kwargs.pop('s3_bucket', AVAILABLE_S3_BUCKETS.legacy) | ||
print( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we ought to use self.print
(though personally, I don't always trust that as it's doing some logging level stuff... in case of this command here, which I understand is supposed to be run manually, we always want the output, right?)
|
||
def __init__(self, *args, **kwargs): | ||
|
||
s3_bucket = kwargs.pop('s3_bucket', AVAILABLE_S3_BUCKETS.legacy) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this seems as a preparation for chosing another bucket than legacy? I don't quite follow where this kwargs
would be set, as there is no argument parse option
self.print_success(f"Starting upload for {self.options['asset_id']}") | ||
asset = Asset.objects.filter(name=self.options['asset_id']).first() | ||
|
||
key = f"{asset.item.collection.name}/{asset.item.name}/{asset.name}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI there's a function for that: def get_asset_path(item, asset_name):
in utils.py
No description provided.