Skip to content

Commit

Permalink
Update class in _LDRD_Kafka
Browse files Browse the repository at this point in the history
  • Loading branch information
cheng-hung committed Jul 26, 2024
1 parent a3b54f4 commit b003d3f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion scripts/_LDRD_Kafka.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def _kafka_process():
'iq_to_gr', 'iq_to_gr_path', 'cfg_fn', 'bkg_fn', 'iq_fn',
'search_and_match', 'mystery_path', 'results_path',
'fitting_pdf', 'fitting_pdf_path', 'cif_fn', 'gr_fn',
'use_sandbox', 'write_to_sandbox', 'sandbox_tiled_client',
'use_sandbox', 'write_to_sandbox', 'sandbox_tiled_client', 'tiled_client',
'fn_TBD',
]

Expand Down
20 changes: 14 additions & 6 deletions scripts/kafka_consumer_iterate_1LL09_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,22 @@ def print_kafka_messages(beamline_acronym, kin=kin, qin=qin, RM=RM, ):

/////////////////////////////////////////////////////////////////////////

global tiled_client, path_0, path_1
# tiled_client = from_profile("nsls2")[beamline_acronym]["raw"]
tiled_client = from_profile(beamline_acronym)
path_0 = csv_path
path_1 = csv_path + '/good_bad'
# global tiled_client, path_0, path_1
# # tiled_client = from_profile("nsls2")[beamline_acronym]["raw"]
# tiled_client = from_profile(beamline_acronym)
# path_0 = csv_path
# path_1 = csv_path + '/good_bad'

## Append raw data tiled_client
kin.tiled_client.append(beamline_acronym)
kin.tiled_client.append(from_profile(beamline_acronym))

## Append good/bad data folder to csv_path
kin.csv_path.append(os.path.join(kin.csv_path[0], 'good_bad'))

## Make directory for good/bad data folder
try:
os.mkdir(path_1)
os.mkdir(kin.csv_path[1])
except FileExistsError:
pass

Expand Down

0 comments on commit b003d3f

Please sign in to comment.