Implemented draft of new background task system
This commit is contained in:
parent
7c121cd142
commit
e4a78046d7
11 changed files with 370 additions and 159 deletions
|
|
@ -4,6 +4,7 @@ from openflexure_microscope.devel import (
|
|||
request,
|
||||
jsonify,
|
||||
abort,
|
||||
taskify
|
||||
)
|
||||
|
||||
import logging
|
||||
|
|
@ -43,8 +44,7 @@ class TileScanAPI(MicroscopeViewPlugin):
|
|||
tags = payload.param("tags", default=[], convert=list)
|
||||
|
||||
logging.info("Running tile scan...")
|
||||
task = self.microscope.task.start(
|
||||
self.plugin.tile,
|
||||
task = taskify(self.plugin.tile)(
|
||||
basename=filename,
|
||||
temporary=temporary,
|
||||
step_size=step_size,
|
||||
|
|
@ -59,5 +59,5 @@ class TileScanAPI(MicroscopeViewPlugin):
|
|||
tags=tags,
|
||||
)
|
||||
|
||||
# return a handle on the autofocus task
|
||||
# return a handle on the scan task
|
||||
return jsonify(task.state), 202
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue