Skip to content

Commit d594f8a

Browse files
Merged in cbillington/lyse/bugfix (pull request labscript-suite#28)
Fixed issue labscript-suite#31: analysis status not updating if no saved results Approved-by: PhyNerd <jan.wrk.fb@gmail.com> Approved-by: Shaun Johnstone <shaun.johnstone@monash.edu>
2 parents 281efff + dba5dba commit d594f8a

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

__main__.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -1717,12 +1717,12 @@ def do_singleshot_analysis(self, filepath):
17171717
self.to_singleshot.put(filepath)
17181718
while True:
17191719
signal, status_percent, updated_data = self.from_singleshot.get()
1720-
if signal in ['error', 'progress']:
1721-
for file in updated_data:
1722-
self.shots_model.update_row(file, status_percent=status_percent, updated_row_data=updated_data[file])
1720+
for file in updated_data:
1721+
# Update the data for all the rows with new data:
1722+
self.shots_model.update_row(file, updated_row_data=updated_data[file])
1723+
# Update the status percent for the the row on which analysis is actually running:
1724+
self.shots_model.update_row(filepath, status_percent=status_percent, dataframe_already_updated=True)
17231725
if signal == 'done':
1724-
# No need to update the dataframe again, that should have been done with the last 'progress' signal:
1725-
self.shots_model.update_row(filepath, status_percent=status_percent, dataframe_already_updated=True)
17261726
return
17271727
if signal == 'error':
17281728
if not os.path.exists(filepath):
@@ -1732,6 +1732,9 @@ def do_singleshot_analysis(self, filepath):
17321732
else:
17331733
self.pause_analysis()
17341734
return
1735+
if signal == 'progress':
1736+
continue
1737+
raise ValueError('invalid signal %s' % str(signal))
17351738

17361739
def do_multishot_analysis(self):
17371740
self.to_multishot.put(None)

0 commit comments

Comments
 (0)