Skip to content

Commit

Permalink
Merge pull request #167 from x-atlas-consortia/karlburke/ReviseCommon…
Browse files Browse the repository at this point in the history
…sS3WorkerConstructor

Switch to using hubmap-commons 2.1.18. Change constructor call for S3…
  • Loading branch information
yuanzhou authored Oct 30, 2024
2 parents d4d9d86 + f5360c8 commit 2e0b02f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ requests==2.32.3
# Use the branch name of commons from github for testing new changes made in commons
# Default is master branch specified in docker-compose.yml if not set
# git+https://github.com/hubmapconsortium/commons.git@${COMMONS_BRANCH}#egg=hubmap-commons
hubmap-commons==2.1.15
hubmap-commons==2.1.18
14 changes: 8 additions & 6 deletions src/uuid_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,13 +336,15 @@ def __init__(self, app_config=None):
,'aws_object_url_expiration_in_secs': app_config['AWS_OBJECT_URL_EXPIRATION_IN_SECS']
,'service_configured_obj_prefix': app_config['AWS_S3_OBJECT_PREFIX']}
try:
self.theS3Worker = S3Worker(self.S3_settings_dict['aws_access_key_id']
,self.S3_settings_dict['aws_secret_access_key']
,self.S3_settings_dict['aws_s3_bucket_name']
,self.S3_settings_dict['aws_object_url_expiration_in_secs'])
self.logger.info("theS3Worker initialized")
self.theS3Worker = S3Worker(ACCESS_KEY_ID=self.S3_settings_dict['aws_access_key_id']
, SECRET_ACCESS_KEY=self.S3_settings_dict['aws_secret_access_key']
, S3_BUCKET_NAME=self.S3_settings_dict['aws_s3_bucket_name']
, S3_OBJECT_URL_EXPIRATION_IN_SECS=self.S3_settings_dict['aws_object_url_expiration_in_secs']
, LARGE_RESPONSE_THRESHOLD=self.S3_settings_dict['large_response_threshold']
, SERVICE_S3_OBJ_PREFIX=self.S3_settings_dict['service_configured_obj_prefix'])
self.logger.info("self.theS3Worker initialized")
except Exception as e:
self.logger.error(f"Error initializing theS3Worker - '{str(e)}'.", exc_info=True)
self.logger.error(f"Error initializing self.theS3Worker - '{str(e)}'.", exc_info=True)
raise Exception(f"Unexpected error: {str(e)}")

if not clientId:
Expand Down

0 comments on commit 2e0b02f

Please sign in to comment.