Merge pull request #164 from jmorganca/restart-server

restart server more gracefully
This commit is contained in:
hoyyeva 2023-07-22 18:19:22 -04:00 committed by GitHub
commit c448443813
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 14 deletions

View file

@ -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": {

View file

@ -1,4 +1,4 @@
declare module '*.svg' {
const content: string;
export default content;
const content: string
export default content
}

View file

@ -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)