Elastic: regenerate picture URL before inserting into ElasticSearch

This ensures the thumbnail URL is public so that it won't expire.
Since this now requires API calls to Google, I've increased the number of
parallel threads used for indexing, since they'll be waiting for network
I/O more.
This commit is contained in:
2018-01-26 10:29:28 +01:00
parent 0744aeb42f
commit 741cdf6e12
3 changed files with 12 additions and 8 deletions

View File

@@ -338,7 +338,7 @@ def process_file(bucket: Bucket,
file_id, status, r)
def generate_link(backend, file_path: str, project_id=None, is_public=False) -> str:
def generate_link(backend, file_path: str, project_id: str=None, is_public=False) -> str:
"""Hook to check the backend of a file resource, to build an appropriate link
that can be used by the client to retrieve the actual file.
"""