possibility to run ap without filling google spreadsheet (LOGBOOK=None)

This commit is contained in:
Dmitry Ozerov
2023-08-22 12:49:21 +02:00
parent b763046ac3
commit 59fa172323

View File

@ -100,11 +100,12 @@ for run in range(last_run,0,-1):
f_log = open(log_file, "w")
credential_file = choice(credential_files)
if logbook_url is not None:
credential_file = choice(credential_files)
log_run = f'python {dir_ap}/ap/update-spreadsheet.py --url {logbook_url} --unique_run {unique_run_number} --run_number {run_number} --acq_number {acq_number} --user_tag {user_tag} --cell_name {cell_name} --time_run_taken {trun} --motor_name {motor_name} --motor_value {motor_value} --credentials {credential_file}'
process=Popen(log_run, shell=True, stdout=process_log_file, stderr=process_log_file)
print(log_run, file = f_log)
log_run = f'python {dir_ap}/ap/update-spreadsheet.py --url {logbook_url} --unique_run {unique_run_number} --run_number {run_number} --acq_number {acq_number} --user_tag {user_tag} --cell_name {cell_name} --time_run_taken {trun} --motor_name {motor_name} --motor_value {motor_value} --credentials {credential_file}'
process=Popen(log_run, shell=True, stdout=process_log_file, stderr=process_log_file)
print(log_run, file = f_log)
f_log.close()
@ -203,11 +204,12 @@ for run in range(1, last_run+1):
f_log = open(log_file, "w")
credential_file = choice(credential_files)
if logbook_url is not None:
credential_file = choice(credential_files)
log_laser = f'python {dir_ap}/ap/update-spreadsheet.py --url {logbook_url} --unique_run {unique_run_number} --number_frames {nframes} --hits_rate {hitrate_value} --laser {laser} --credentials {credential_file}'
process=Popen(log_laser, shell=True, stdout=process_log_file, stderr=process_log_file)
print(log_laser, file = f_log)
log_laser = f'python {dir_ap}/ap/update-spreadsheet.py --url {logbook_url} --unique_run {unique_run_number} --number_frames {nframes} --hits_rate {hitrate_value} --laser {laser} --credentials {credential_file}'
process=Popen(log_laser, shell=True, stdout=process_log_file, stderr=process_log_file)
print(log_laser, file = f_log)
#slurm_partition = choice(["prod-aramis", "prod-aramis", "prod-aramis", "prod-athos"])
slurm_partition = choice(["prod-aramis", "prod-aramis", "prod-aramis"])