/* |-------------------------------------------------------------------------- | Headless browser lifecycle |-------------------------------------------------------------------------- | | The merchant price comparison feature (app/services/merchant_price_service.ts) | launches a single shared headless Chromium instance on demand (see | app/services/headless_browser_service.ts). This makes sure that process | is closed when the app shuts down, instead of leaking a Chromium child | process. | */ import app from '@adonisjs/core/services/app' app.terminating(async () => { const { closeBrowser } = await import('#services/headless_browser_service') await closeBrowser() })