Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wiki-js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
wiki-js
Commits
6d770926
Commit
6d770926
authored
Jul 20, 2017
by
Oleg Iasinovskyi
Committed by
Nicolas Giard
Jul 20, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: infinite loop on termination signal
parent
d5157a3e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
index.js
server/index.js
+3
-1
No files found.
server/index.js
View file @
6d770926
...
@@ -266,9 +266,11 @@ bgAgent.on('message', m => {
...
@@ -266,9 +266,11 @@ bgAgent.on('message', m => {
// ----------------------------------------
// ----------------------------------------
graceful
.
on
(
'exit'
,
()
=>
{
graceful
.
on
(
'exit'
,
()
=>
{
global
.
winston
.
info
(
'- SHUTTING DOWN - Terminating Background Agent...'
)
bgAgent
.
kill
()
global
.
winston
.
info
(
'- SHUTTING DOWN - Performing git sync...'
)
global
.
winston
.
info
(
'- SHUTTING DOWN - Performing git sync...'
)
return
global
.
git
.
resync
().
then
(()
=>
{
return
global
.
git
.
resync
().
then
(()
=>
{
global
.
winston
.
info
(
'- SHUTTING DOWN - Git sync successful. Now safe to exit.'
)
global
.
winston
.
info
(
'- SHUTTING DOWN - Git sync successful. Now safe to exit.'
)
process
.
kill
(
process
.
pid
,
'SIGINT'
)
process
.
exit
(
)
})
})
})
})
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