Implemented basic threaded tasks for long-running functionality

This commit is contained in:
Joel Collins 2019-01-23 16:48:49 +00:00
parent 4a09727e65
commit a40cb9b9f6
10 changed files with 328 additions and 14 deletions

View file

@ -18,6 +18,7 @@ except ImportError:
from .capture import CaptureObject, capture_from_dict, BASE_CAPTURE_PATH
from openflexure_microscope.config import USER_CONFIG_DIR
from openflexure_microscope.utilities import entry_by_id
def last_entry(object_list: list):
@ -28,14 +29,6 @@ def last_entry(object_list: list):
return None
def entry_by_id(id: str, object_list: list):
"""Return an object from a list, if <object>.id matches id argument."""
found = None
for o in object_list:
if o.id == id:
found = o
return found
def generate_basename():
"""Return a default filename based on the capture datetime"""