Skip to content

Commit

Permalink
Merge pull request #386 from CIMAC-CIDC/pact-user
Browse files Browse the repository at this point in the history
CIDC-1484 API bump to add pact user role
  • Loading branch information
scvannost committed Oct 4, 2022
2 parents 30bac42 + 79374bd commit 8abaf90
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -9,6 +9,10 @@ This Changelog tracks changes to this project. The notes below include a summary
- `fixed` for any bug fixes.
- `security` in case of vulnerabilities.

## 01 Oct 2022

- `changed` API bump for new PACT User role

## 16 Sep 2022

- `changed` bump API for encrypting participant IDs
Expand Down
8 changes: 6 additions & 2 deletions functions/csms.py
Expand Up @@ -56,7 +56,8 @@ def update_cidc_from_csms(event: dict, context: BackgroundContext):
)
dry_run = False

email_msg = []
email_msg: str = []
email_error: bool = False

if dry_run:
if "data" in event:
Expand Down Expand Up @@ -155,11 +156,14 @@ def update_cidc_from_csms(event: dict, context: BackgroundContext):
email_msg.append(
f"Problem with {trial_id} manifest {manifest.get('manifest_id')}: {e!r}"
)
email_error = True

if email_msg:
logger.info(f"Email: {email_msg}")
send_email(
CIDC_MAILING_LIST,
f"[DEV ALERT]({ENV}) Error updating from CSMS: {datetime.now()}",
f"[DEV ALERT]({ENV})"
+ ("Error" if email_error else "Success")
+ f" updating from CSMS: {datetime.now()}",
html_content="<br />".join(email_msg),
)
2 changes: 1 addition & 1 deletion requirements.txt
Expand Up @@ -19,4 +19,4 @@ matplotlib==3.4.1
statsmodels==0.12.2
scikit_learn==0.24.2

cidc-api-modules~=0.27.1
cidc-api-modules~=0.27.2

0 comments on commit 8abaf90

Please sign in to comment.