mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 10:53:34 +03:00
Prevent grunt from exiting without letting express stop
This commit is contained in:
parent
f8cdaf0c24
commit
e4ab28b70f
10
Gruntfile.js
10
Gruntfile.js
@ -48,6 +48,16 @@ const configureGrunt = function (grunt) {
|
|||||||
grunt.loadNpmTasks('grunt-subgrunt');
|
grunt.loadNpmTasks('grunt-subgrunt');
|
||||||
grunt.loadNpmTasks('grunt-update-submodules');
|
grunt.loadNpmTasks('grunt-update-submodules');
|
||||||
|
|
||||||
|
/** This little bit of weirdness gives the express server chance to shutdown properly */
|
||||||
|
const waitBeforeExit = () => {
|
||||||
|
setTimeout(() => {
|
||||||
|
process.exit(0);
|
||||||
|
}, 1000);
|
||||||
|
};
|
||||||
|
|
||||||
|
process.on('SIGINT', waitBeforeExit);
|
||||||
|
process.on('SIGTERM', waitBeforeExit);
|
||||||
|
|
||||||
const cfg = {
|
const cfg = {
|
||||||
// #### Common paths used by tasks
|
// #### Common paths used by tasks
|
||||||
paths: {
|
paths: {
|
||||||
|
Loading…
Reference in New Issue
Block a user