-
Notifications
You must be signed in to change notification settings - Fork 1
Move to event-driven controller #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Make Controller an EventEmitter Rename 'failed' state to 'error'
|
In testing |
| // Callbacks can be promises | ||
| // eslint-disable-next-line @typescript-eslint/no-misused-promises | ||
| this.on('load', this.handleLoad) | ||
| this.on('reload', this.handleReload) |
Check failure
Code scanning / ESLint
Disallow Promises in places not designed to handle them Error
|
|
||
| // StartKoboldCpp starts koboldcpp executable and wait before it responds. | ||
| runKoboldCpp(args: KoboldCppArgs) { | ||
| private handleLoad = async (args: KoboldCppArgs) => { |
Check failure
Code scanning / ESLint
Disallow async functions which do not return promises and have no `await` expression Error
| this.aborter?.abort() | ||
|
|
||
| this.modelStatus.State = 'stopping' | ||
| this.waitForChildState('offline', modelStopTimeoutMs) |
Check failure
Code scanning / ESLint
Require Promise-like statements to be handled appropriately Error
| await sleep(waitItervalMs) | ||
|
|
||
| await waitForModel() | ||
| return await waitForModel() |
Check failure
Code scanning / ESLint
Require `return` statements to either always or never specify values Error
| await sleep(waitItervalMs) | ||
|
|
||
| await waitForModel() | ||
| return await waitForModel() |
Check failure
Code scanning / ESLint
Require expressions of type void to appear in statement position Error
Make
Controlleroperations event-basedRename
failedstate toerror