Moved task routes into base labthing
This commit is contained in:
parent
f2af359b8b
commit
1047257242
21 changed files with 123 additions and 1481 deletions
|
|
@ -59,13 +59,3 @@ class TaskResource(Resource):
|
|||
task.terminate()
|
||||
|
||||
return jsonify(task.state)
|
||||
|
||||
|
||||
def add_tasks_to_labthing(labthing, prefix=""):
|
||||
"""
|
||||
Add all settings and status resources to a labthing
|
||||
"""
|
||||
labthing.add_resource(TaskList, f"{prefix}/tasks", endpoint="TasksProperty")
|
||||
labthing.register_property(TaskList)
|
||||
labthing.add_resource(TaskResource, f"{prefix}/tasks/<id>", endpoint="TaskResource")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue