Merge branch 'stitch-all-logging' into 'v3'
Log during stitch all and handle errors Closes #710 See merge request openflexure/openflexure-microscope-server!593
This commit is contained in:
commit
4e58d613d0
4 changed files with 75 additions and 16 deletions
|
|
@ -11,7 +11,6 @@ import os
|
|||
import threading
|
||||
import time
|
||||
from datetime import datetime
|
||||
from subprocess import SubprocessError
|
||||
from types import TracebackType
|
||||
from typing import (
|
||||
Annotated,
|
||||
|
|
@ -717,7 +716,7 @@ class SmartScanThing(OFMThing):
|
|||
except lt.exceptions.InvocationCancelledError:
|
||||
# Sleep for 1 second just to allow invocation logs to pass to user.
|
||||
time.sleep(1)
|
||||
except SubprocessError as e:
|
||||
except ChildProcessError as e:
|
||||
self.logger.error(f"Stitching failed: {e}", exc_info=e)
|
||||
|
||||
@lt.action(use_global_lock=False)
|
||||
|
|
@ -744,4 +743,5 @@ class SmartScanThing(OFMThing):
|
|||
# need stitching.
|
||||
for scan in self.get_data_for_gallery():
|
||||
if scan.dzi is None:
|
||||
self.logger.info(f"Stitching {scan.name}")
|
||||
self.stitch_scan(scan_name=scan.name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue