Updated tasks nomenclature
This commit is contained in:
parent
56051f8863
commit
24398ba7dc
27 changed files with 100 additions and 136 deletions
|
|
@ -1,7 +1,6 @@
|
|||
from labthings.server.find import find_component
|
||||
from labthings.server.extensions import BaseExtension
|
||||
from labthings.server.view import View, ActionView, PropertyView
|
||||
from labthings.server import fields
|
||||
from labthings import fields, find_component
|
||||
from labthings.extensions import BaseExtension
|
||||
from labthings.views import View, ActionView, PropertyView
|
||||
|
||||
from openflexure_microscope.devel import JsonResponse, request, abort
|
||||
from openflexure_microscope.utilities import set_properties
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
from labthings.server.extensions import BaseExtension
|
||||
from labthings.server.view import View, PropertyView
|
||||
from labthings.server import fields
|
||||
from labthings.server.find import find_component
|
||||
from labthings.extensions import BaseExtension
|
||||
from labthings.views import View, PropertyView
|
||||
from labthings import fields, find_component
|
||||
|
||||
from openflexure_microscope.paths import settings_file_path, check_rw
|
||||
from openflexure_microscope.config import OpenflexureSettingsFile
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from labthings.server.view import View, ActionView
|
||||
from labthings.server.find import find_component
|
||||
from labthings.server.extensions import BaseExtension
|
||||
from labthings import find_component
|
||||
from labthings.views import View, ActionView
|
||||
from labthings.extensions import BaseExtension
|
||||
|
||||
from flask import abort
|
||||
|
||||
|
|
|
|||
|
|
@ -6,14 +6,13 @@ from typing import Tuple
|
|||
from functools import reduce
|
||||
|
||||
from openflexure_microscope.captures.capture_manager import generate_basename
|
||||
from labthings.server.find import find_component, find_extension
|
||||
from labthings.server.extensions import BaseExtension
|
||||
from labthings.server import fields
|
||||
from labthings.actions import current_action
|
||||
|
||||
from openflexure_microscope.devel import abort, update_task_progress
|
||||
from labthings import fields, find_component, find_extension, current_action, update_action_progress
|
||||
from labthings.views import View, ActionView
|
||||
from labthings.extensions import BaseExtension
|
||||
|
||||
from openflexure_microscope.devel import abort
|
||||
|
||||
from labthings.server.view import View, ActionView
|
||||
import time
|
||||
|
||||
|
||||
|
|
@ -209,7 +208,7 @@ class ScanExtension(BaseExtension):
|
|||
)
|
||||
# Update task progress
|
||||
self._images_captured_so_far += 1
|
||||
update_task_progress(self.progress())
|
||||
update_action_progress(self.progress())
|
||||
else:
|
||||
logging.debug("Entering z-stack")
|
||||
self.stack(
|
||||
|
|
@ -279,7 +278,7 @@ class ScanExtension(BaseExtension):
|
|||
)
|
||||
# Update task progress
|
||||
self._images_captured_so_far += 1
|
||||
update_task_progress(self.progress())
|
||||
update_action_progress(self.progress())
|
||||
if current_action() and current_action().stopped:
|
||||
return
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
from openflexure_microscope.devel import (
|
||||
JsonResponse,
|
||||
request,
|
||||
update_task_progress,
|
||||
)
|
||||
|
||||
from flask import send_file, abort, url_for
|
||||
|
|
@ -12,12 +11,11 @@ import zipfile
|
|||
import tempfile
|
||||
import logging
|
||||
|
||||
from labthings.server.find import find_component
|
||||
from labthings.server.view import View, ActionView, PropertyView
|
||||
from labthings.server.schema import Schema, pre_dump
|
||||
from labthings.server import fields
|
||||
from labthings.server.extensions import BaseExtension
|
||||
from labthings.server.utilities import description_from_view
|
||||
from labthings import fields, find_component, update_action_progress
|
||||
from labthings.views import View, ActionView, PropertyView
|
||||
from labthings.schema import Schema, pre_dump
|
||||
from labthings.extensions import BaseExtension
|
||||
from labthings.utilities import description_from_view
|
||||
|
||||
|
||||
class ZipObjectSchema(Schema):
|
||||
|
|
@ -107,7 +105,7 @@ class ZipManager:
|
|||
)
|
||||
zipObj.write(file_path, arcname=rel_path)
|
||||
# Update task progress
|
||||
update_task_progress(int((index / n_files) * 100))
|
||||
update_action_progress(int((index / n_files) * 100))
|
||||
|
||||
session_id = str(uuid.uuid4())
|
||||
session_description = ZipObjectDescription(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue