Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjtaylor committed Dec 14, 2023
1 parent 82e1835 commit d61751b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ def synapse_login(synapse_config=synapseclient.client.CONFIG_FILE):
Returns:
Synapse connection
"""
try:
syn = synapseclient.Synapse(skip_checks=True)
if os.getenv("SCHEDULED_JOB_SECRETS") is not None:
secrets = json.loads(os.getenv("SCHEDULED_JOB_SECRETS"))
syn.login(silent=True, authToken=secrets["SYNAPSE_AUTH_TOKEN"])
else:
syn.login(silent=True)
syn = synapseclient.Synapse(skip_checks=True)
if os.getenv("SCHEDULED_JOB_SECRETS") is not None:
secrets = json.loads(os.getenv("SCHEDULED_JOB_SECRETS"))
syn.login(silent=True, authToken=secrets["SYNAPSE_AUTH_TOKEN"])
else:
syn.login(silent=True)
return syn


Expand Down

0 comments on commit d61751b

Please sign in to comment.