We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b29b373 commit ef4a1d5Copy full SHA for ef4a1d5
examples/builder.py
@@ -1,12 +1,18 @@
1
import uuid
2
import types
3
import functools
4
+import atexit
5
+import logging
6
7
from labthings.server.quick import create_app, property_of
8
9
from components.pdf_component import PdfComponent
10
11
12
+def cleanup():
13
+ logging.info("Exiting. Running any cleanup code here...")
14
+
15
16
# Create LabThings Flask app
17
app, labthing = create_app(
18
__name__,
@@ -34,6 +40,8 @@
34
40
"/dictionary",
35
41
)
36
42
43
+atexit.register(cleanup)
44
37
45
# Start the app
38
46
if __name__ == "__main__":
39
47
from labthings.server.wsgi import Server
0 commit comments