mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
feat: add browser service shutdown to server lifecycle
This commit is contained in:
@@ -385,6 +385,14 @@ async function shutdown(signal: string) {
|
|||||||
// AI package may not be available
|
// AI package may not be available
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const { shutdownBrowser } = await import("./lib/browser-service.js");
|
||||||
|
await shutdownBrowser();
|
||||||
|
console.log("Browser service shut down");
|
||||||
|
} catch {
|
||||||
|
// Browser service may not have been initialized
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await shutdownAnalytics();
|
await shutdownAnalytics();
|
||||||
console.log("Analytics flushed");
|
console.log("Analytics flushed");
|
||||||
|
|||||||
Reference in New Issue
Block a user