-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from SSTIA/master
merge upstream
- Loading branch information
Showing
6 changed files
with
88 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import _ from 'lodash'; | ||
|
||
export default async () => { | ||
|
||
const system = { | ||
initialized: false, | ||
init: async () => { | ||
system.initialized = false; | ||
await DI.model.sys.setAsync('readonly', true); | ||
|
||
const sdocs = await DI.models.getExceptionSubmissionAsync(); | ||
_.forEach(sdocs, sdoc => { | ||
|
||
}); | ||
|
||
system.initialized = true; | ||
await DI.model.sys.setAsync('readonly', false); | ||
}, | ||
}; | ||
|
||
let readyExit = false; | ||
process.on('SIGINT', async () => { | ||
DI.logger.info('Server received SIGINT, exiting'); | ||
if (!readyExit) { | ||
readyExit = true; | ||
await DI.model.sys.setAsync('readonly', true); | ||
setInterval(async () => { | ||
// waiting for all process ending | ||
process.exit(0); | ||
}, 1000); | ||
} | ||
}); | ||
|
||
return system; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -132,6 +132,7 @@ module.exports = { | |
}, | ||
}, | ||
], | ||
threads: 4, | ||
}), | ||
|
||
new webpack.ProvidePlugin({ | ||
|