Skip to content

Commit bcfd925

Browse files
authored
Merge pull request #9 from JunAishima/fix-beamline-acronym
Fix beamline acronym
2 parents 5bb0584 + 636f6bc commit bcfd925

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

data_validation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def get_api_key_from_env(api_key=None):
1616

1717

1818
@task(retries=2, retry_delay_seconds=10)
19-
def get_run(uid, api_key=None, beamline_acronym=None):
19+
def get_run(uid, api_key=None, beamline_acronym=BEAMLINE_OR_ENDSTATION):
2020
if not api_key:
2121
api_key = get_api_key_from_env()
2222
cl = from_uri("https://tiled.nsls2.bnl.gov", api_key=api_key)

end_of_run_workflow.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from prefect.context import FlowRunContext
66
from prefect.settings import PREFECT_UI_URL
77

8-
from data_validation import data_validation, get_run, get_api_key_from_env
8+
from data_validation import data_validation, get_run
99

1010
CATALOG_NAME = "cdi"
1111

@@ -33,10 +33,6 @@ def end_of_run_workflow(stop_doc, api_key=None, dry_run=False):
3333
# Get the uid.
3434
uid = stop_doc["run_start"]
3535

36-
# Get Tiled API key, if not set already
37-
if not api_key:
38-
api_key = get_api_key_from_env()
39-
4036
# Get the scan_id.
4137
run = get_run(uid, api_key=api_key)
4238
scan_id = run.start["scan_id"]

0 commit comments

Comments
 (0)