mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-12 08:47:01 +00:00
Merge pull request #164 from jmorganca/restart-server
restart server more gracefully
This commit is contained in:
@@ -11,7 +11,9 @@
|
|||||||
"make": "electron-forge make",
|
"make": "electron-forge make",
|
||||||
"make:sign": "SIGN=1 electron-forge make",
|
"make:sign": "SIGN=1 electron-forge make",
|
||||||
"publish": "SIGN=1 electron-forge publish",
|
"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": [],
|
"keywords": [],
|
||||||
"author": {
|
"author": {
|
||||||
|
|||||||
4
app/src/declarations.d.ts
vendored
4
app/src/declarations.d.ts
vendored
@@ -1,4 +1,4 @@
|
|||||||
declare module '*.svg' {
|
declare module '*.svg' {
|
||||||
const content: string;
|
const content: string
|
||||||
export default content;
|
export default content
|
||||||
}
|
}
|
||||||
@@ -78,7 +78,7 @@ function createSystemtray() {
|
|||||||
|
|
||||||
tray = new Tray(iconPath)
|
tray = new Tray(iconPath)
|
||||||
|
|
||||||
nativeTheme.on('updated', function theThemeHasChanged () {
|
nativeTheme.on('updated', function theThemeHasChanged() {
|
||||||
if (nativeTheme.shouldUseDarkColors) {
|
if (nativeTheme.shouldUseDarkColors) {
|
||||||
app.isPackaged
|
app.isPackaged
|
||||||
? tray.setImage(path.join(process.resourcesPath, 'ollama_icon_16x16Template.png'))
|
? tray.setImage(path.join(process.resourcesPath, 'ollama_icon_16x16Template.png'))
|
||||||
@@ -116,8 +116,7 @@ function server() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
function restart() {
|
function restart() {
|
||||||
logger.info('Restarting the server...')
|
setTimeout(server, 3000)
|
||||||
server()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
proc.on('exit', restart)
|
proc.on('exit', restart)
|
||||||
|
|||||||
Reference in New Issue
Block a user