2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-24 19:04:02 +08:00

scheduler: consider the pipeline flushed if everything has a lower priority than us. Closes #640

This commit is contained in:
Sebastien Bourdeauducq 2017-05-22 18:43:59 +08:00
parent a649408304
commit e4a631a3d7
3 changed files with 6 additions and 1 deletions

View File

@ -43,6 +43,9 @@ Release notes
those logs to the master. See the example device databases to see how to
instantiate this controller. Using ``artiq_session`` ensures that a controller
manager is running simultaneously with the master.
* Experiments scheduled with the "flush pipeline" option now proceed when there
are lower-priority experiments in the pipeline. Only experiments at the current
(or higher) priority level are flushed.
2.3

View File

@ -294,7 +294,8 @@ class _ExperimentDock(QtWidgets.QMdiSubWindow):
priority.valueChanged.connect(update_priority)
flush = QtWidgets.QCheckBox("Flush")
flush.setToolTip("Flush the pipeline before starting the experiment")
flush.setToolTip("Flush the pipeline (of current- and higher-priority "
"experiments) before starting the experiment")
self.layout.addWidget(flush, 2, 2, 1, 2)
flush.setChecked(scheduling["flush"])

View File

@ -204,6 +204,7 @@ class PrepareStage(TaskObject):
run.status = RunStatus.flushing
while not all(r.status in (RunStatus.pending,
RunStatus.deleting)
or r.priority < run.priority
or r is run
for r in self.pool.runs.values()):
ev = [self.pool.state_changed.wait(),