Fixed metadata and tags not storing to capture DB on update or exit
This commit is contained in:
parent
7b7a8dfb4a
commit
ed12cc7bce
3 changed files with 24 additions and 1 deletions
|
|
@ -103,8 +103,15 @@ app.register_blueprint(task_blueprint, url_prefix=uri('/task', 'v1'))
|
|||
def cleanup():
|
||||
global api_microscope
|
||||
logging.debug("App teardown started...")
|
||||
|
||||
# Save config
|
||||
api_microscope.rc.save(backup=True)
|
||||
if api_microscope.rc:
|
||||
api_microscope.rc.save(backup=True)
|
||||
|
||||
# Update capture DB and metadata files before exiting
|
||||
if api_microscope.camera:
|
||||
api_microscope.camera.store_captures()
|
||||
|
||||
# Close down the microscope
|
||||
api_microscope.close()
|
||||
logging.debug("App teardown complete.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue