chore: reduce destroy attempts

This commit is contained in:
Louis 2024-11-19 12:37:41 +07:00
parent 05019f7236
commit bd850fb357
No known key found for this signature in database
GPG Key ID: 44FA9F4D33C37DE2
3 changed files with 10 additions and 5 deletions

View File

@ -1 +1 @@
1.0.3-rc1
1.0.3-rc2

View File

@ -69,11 +69,11 @@ 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))
// Run the process watchdog
const systemInfo = await systemInformation()
await this.clean()
await executeOnMain(NODE, 'run', systemInfo)
this.subscribeToEvents()
@ -160,7 +160,8 @@ export default class JanInferenceCortexExtension extends LocalOAIEngine {
return ky
.get(`${CORTEX_API_URL}/healthz`, {
retry: {
limit: 10,
limit: 20,
delay: () => 500,
methods: ['get'],
},
})
@ -192,6 +193,9 @@ export default class JanInferenceCortexExtension extends LocalOAIEngine {
return ky
.delete(`${CORTEX_API_URL}/processmanager/destroy`, {
timeout: 2000, // maximum 2 seconds
retry: {
limit: 0,
},
})
.catch(() => {
// Do nothing

View File

@ -155,7 +155,8 @@ export class CortexAPI implements ICortexAPI {
return ky
.get(`${API_URL}/healthz`, {
retry: {
limit: 10,
limit: 20,
delay: () => 500,
methods: ['get'],
},
})