Merge pull request #164 from jmorganca/restart-server
restart server more gracefully
This commit is contained in:
commit
c448443813
3 changed files with 15 additions and 14 deletions
|
@ -11,7 +11,9 @@
|
|||
"make": "electron-forge make",
|
||||
"make:sign": "SIGN=1 electron-forge make",
|
||||
"publish": "SIGN=1 electron-forge publish",
|
||||
"lint": "eslint --ext .ts,.tsx ."
|
||||
"lint": "eslint --ext .ts,.tsx .",
|
||||
"format": "prettier --check . --ignore-path .gitignore",
|
||||
"format:fix": "prettier --write . --ignore-path .gitignore"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": {
|
||||
|
|
4
app/src/declarations.d.ts
vendored
4
app/src/declarations.d.ts
vendored
|
@ -1,4 +1,4 @@
|
|||
declare module '*.svg' {
|
||||
const content: string;
|
||||
export default content;
|
||||
const content: string
|
||||
export default content
|
||||
}
|
|
@ -78,7 +78,7 @@ function createSystemtray() {
|
|||
|
||||
tray = new Tray(iconPath)
|
||||
|
||||
nativeTheme.on('updated', function theThemeHasChanged () {
|
||||
nativeTheme.on('updated', function theThemeHasChanged() {
|
||||
if (nativeTheme.shouldUseDarkColors) {
|
||||
app.isPackaged
|
||||
? tray.setImage(path.join(process.resourcesPath, 'ollama_icon_16x16Template.png'))
|
||||
|
@ -116,8 +116,7 @@ function server() {
|
|||
})
|
||||
|
||||
function restart() {
|
||||
logger.info('Restarting the server...')
|
||||
server()
|
||||
setTimeout(server, 3000)
|
||||
}
|
||||
|
||||
proc.on('exit', restart)
|
||||
|
|
Loading…
Add table
Reference in a new issue