Save config on server shutdown
This commit is contained in:
parent
7a63451063
commit
36b0cb0be0
1 changed files with 3 additions and 0 deletions
|
|
@ -118,6 +118,9 @@ app.register_blueprint(task_blueprint, url_prefix=uri('/task', 'v1'))
|
||||||
# Automatically clean up microscope at exit
|
# Automatically clean up microscope at exit
|
||||||
def cleanup():
|
def cleanup():
|
||||||
global api_microscope
|
global api_microscope
|
||||||
|
# Save config
|
||||||
|
api_microscope.rc.save(backup=True)
|
||||||
|
# Close down the microscope
|
||||||
api_microscope.close()
|
api_microscope.close()
|
||||||
|
|
||||||
atexit.register(cleanup)
|
atexit.register(cleanup)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue