Updated to new Action tasks
This commit is contained in:
parent
28e555ad9b
commit
eaf4cf09f5
9 changed files with 27 additions and 65 deletions
|
|
@ -1,9 +1,7 @@
|
|||
from labthings.server.view import View
|
||||
from labthings.server.find import find_component
|
||||
from labthings.server.extensions import BaseExtension
|
||||
from labthings.server.decorators import marshal_task, ThingAction
|
||||
|
||||
from labthings.core.tasks import taskify
|
||||
from labthings.server.decorators import ThingAction
|
||||
|
||||
from flask import abort
|
||||
|
||||
|
|
@ -62,7 +60,6 @@ def recalibrate(microscope):
|
|||
|
||||
@ThingAction
|
||||
class RecalibrateView(View):
|
||||
@marshal_task
|
||||
def post(self):
|
||||
microscope = find_component("org.openflexure.microscope")
|
||||
|
||||
|
|
@ -71,7 +68,7 @@ class RecalibrateView(View):
|
|||
|
||||
logging.info("Starting microscope recalibration...")
|
||||
|
||||
return taskify(recalibrate)(microscope)
|
||||
return recalibrate(microscope)
|
||||
|
||||
|
||||
@ThingAction
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue