Removed use of deprecated current_task_stopped
This commit is contained in:
parent
c8c66803e5
commit
54c5605cb1
1 changed files with 3 additions and 3 deletions
|
|
@ -9,7 +9,7 @@ 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.tasks import current_task_stopped
|
||||
from labthings.actions import current_action
|
||||
|
||||
from openflexure_microscope.devel import abort, update_task_progress
|
||||
|
||||
|
|
@ -225,7 +225,7 @@ class ScanExtension(BaseExtension):
|
|||
annotations=annotations,
|
||||
tags=tags,
|
||||
)
|
||||
if current_task_stopped():
|
||||
if current_action() and current_action().stopped:
|
||||
return
|
||||
# Make sure we use our current best estimate of focus (i.e. the current position) next point
|
||||
next_z = microscope.stage.position[2]
|
||||
|
|
@ -280,7 +280,7 @@ class ScanExtension(BaseExtension):
|
|||
# Update task progress
|
||||
self._images_captured_so_far += 1
|
||||
update_task_progress(self.progress())
|
||||
if current_task_stopped():
|
||||
if current_action() and current_action().stopped:
|
||||
return
|
||||
|
||||
if i != steps - 1:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue