Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
fe758ca3
Commit
fe758ca3
authored
Jul 16, 2023
by
Jeffrey Morgan
Browse files
app: do not restart the server if app is closing
parent
08b933cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
app/src/index.ts
app/src/index.ts
+5
-2
No files found.
app/src/index.ts
View file @
fe758ca3
...
@@ -95,10 +95,12 @@ function server() {
...
@@ -95,10 +95,12 @@ function server() {
logger
.
error
(
data
.
toString
().
trim
())
logger
.
error
(
data
.
toString
().
trim
())
})
})
proc
.
on
(
'
exit
'
,
()
=>
{
function
restart
()
{
logger
.
info
(
'
Restarting the server...
'
)
logger
.
info
(
'
Restarting the server...
'
)
server
()
server
()
})
}
proc
.
on
(
'
exit
'
,
restart
)
proc
.
on
(
'
disconnect
'
,
()
=>
{
proc
.
on
(
'
disconnect
'
,
()
=>
{
logger
.
info
(
'
Server disconnected. Reconnecting...
'
)
logger
.
info
(
'
Server disconnected. Reconnecting...
'
)
...
@@ -106,6 +108,7 @@ function server() {
...
@@ -106,6 +108,7 @@ function server() {
})
})
process
.
on
(
'
exit
'
,
()
=>
{
process
.
on
(
'
exit
'
,
()
=>
{
proc
.
off
(
'
exit
'
,
restart
)
proc
.
kill
()
proc
.
kill
()
})
})
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment