chore: ensure server is started before letting other requests go thru

This commit is contained in:
Louis 2024-11-19 23:38:06 +07:00
parent 11637c5244
commit 0b3847a8b1

View File

@ -69,12 +69,13 @@ export default class JanInferenceCortexExtension extends LocalOAIEngine {
super.onLoad()
await this.queue.add(() => this.clean())
this.queue.add(() => this.healthz())
this.queue.add(() => this.setDefaultEngine(systemInfo))
this.queue.add(() => this.clean())
// Run the process watchdog
const systemInfo = await systemInformation()
await executeOnMain(NODE, 'run', systemInfo)
this.queue.add(() => executeOnMain(NODE, 'run', systemInfo))
this.queue.add(() => this.healthz())
this.queue.add(() => this.setDefaultEngine(systemInfo))
this.subscribeToEvents()
window.addEventListener('beforeunload', () => {