Skip to content
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

[PROD] Added LabMetadata processing for 2018 and 2017 sheets #601

Merged
merged 1 commit into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions data_processors/lims/lambdas/labmetadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def _halt(msg):
def scheduled_update_handler(event, context):
"""event payload dict
{
'sheets': ["2019", "2020", "2021", "2022", "2023"],
'sheets': ["2017", "2018", "2019", "2020", "2021", "2022", "2023"],
'truncate': True
}
Handler for LabMetadata update by reading the designated Spreadsheet file from Google Drive.
Expand All @@ -52,7 +52,7 @@ def scheduled_update_handler(event, context):
requested_time = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
logger.info(f"Reading LabMetadata sheet from google drive at {requested_time}")

years = event.get('sheets', ["2019", "2020", "2021", "2022", "2023"])
years = event.get('sheets', ["2017", "2018", "2019", "2020", "2021", "2022", "2023"])
is_truncate = event.get('truncate', True)

if not isinstance(years, list):
Expand Down
4 changes: 2 additions & 2 deletions serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ functions:
- schedule:
rate: cron(0 12 * * ? *)
enabled: ${self:custom.enabled.${self:provider.stage}, self:custom.enabled.other}
timeout: 240
timeout: 360

labmetadata_scheduled_update_processor:
handler: data_processors.lims.lambdas.labmetadata.scheduled_update_handler
Expand All @@ -137,7 +137,7 @@ functions:
- schedule:
rate: cron(0 12 * * ? *)
enabled: ${self:custom.enabled.${self:provider.stage}, self:custom.enabled.other}
timeout: 240
timeout: 360

sqs_s3_event_processor:
handler: data_processors.s3.lambdas.s3_event.handler
Expand Down