mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
restart: gracefully handle restart failure
In case Grist isn't running with the supervisor (e.g. it's running under nodemon instead via `yarn start`), surface the problem to the frontend.
This commit is contained in:
committed by
jordigh
parent
9ae8918156
commit
960f023618
@@ -5,7 +5,8 @@ let grist;
|
||||
function startGrist(newConfig={}) {
|
||||
// H/T https://stackoverflow.com/a/36995148/11352427
|
||||
grist = spawn('./sandbox/run.sh', {
|
||||
stdio: ['inherit', 'inherit', 'inherit', 'ipc']
|
||||
stdio: ['inherit', 'inherit', 'inherit', 'ipc'],
|
||||
env: {...process.env, GRIST_RUNNING_UNDER_SUPERVISOR: true}
|
||||
});
|
||||
grist.on('message', function(data) {
|
||||
if (data.action === 'restart') {
|
||||
|
||||
Reference in New Issue
Block a user