Implement hardware locks

This commit is contained in:
Joel Collins 2019-01-24 12:11:01 +00:00
parent a40cb9b9f6
commit 8292ebf7c7
10 changed files with 268 additions and 170 deletions

View file

@ -67,6 +67,7 @@ class LongRunningAPI(MicroscopeViewPlugin):
# Extract a values from the JSON payload.
time_to_run = payload.param('time', default=10, convert=int)
# Attach the long-running method as a microscope task
try:
task = self.microscope.task.start(self.plugin.long_running, time_to_run)
return jsonify(task.state), 202