-
Notifications
You must be signed in to change notification settings - Fork 5
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
Availability facet #138
base: main
Are you sure you want to change the base?
Availability facet #138
Conversation
cernopendata/config.py
Outdated
): | ||
_query = _query & ~dsl.Q("match", **{"distribution.availability": "ondemand"}) | ||
|
||
# if ( |
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.
can be deleted?
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've put it back, since the tests were not happy. If we remove this, we break backward compatibility if a user was searching through this field
f.delete() | ||
elif "type" in file and file["type"] == "index.txt": | ||
# The txt indexes should be ignored. Just delete the file | ||
f.delete() | ||
else: | ||
real_files.append(file) | ||
try: | ||
obj = ObjectVersion.create(record.bucket, filename, _file_id=f.id) | ||
obj = FileObjectCold.create(record.bucket, filename, f.id) |
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.
obj = FileObjectCold.create(record.bucket, filename, f.id) | |
obj = FileObjectCold.create_version(record.bucket, filename, f.id) |
just to separate the creation of a file obj and file object version?
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.
Ok, thanks! I'll address this on #137 (this PR included two commits, the one of 137 and another one based on that one).
"""Overwrite the fileobject to get multiple URI and availability.""" | ||
|
||
@classmethod | ||
def create(self, bucket, filename, file_id): |
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.
def create(self, bucket, filename, file_id): | |
def create_version(self, bucket, filename, file_id): |
Addresses #118