Skip to content

Commit 52bf698

Browse files
committed
delete temp files
Signed-off-by: Grant Linville <[email protected]>
1 parent 6daee5d commit 52bf698

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

gptscript/daemon.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66

77
def start_uvicorn(app):
88
cert, key, client_cert = save_certificates_from_env()
9+
10+
@app.on_event("shutdown")
11+
def cleanup():
12+
os.remove(cert)
13+
os.remove(key)
14+
os.remove(client_cert)
15+
916
import uvicorn
1017
uvicorn.run(
1118
app,

0 commit comments

Comments
 (0)