mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
supervisor: remove config stub
The configuration is now handled by the config API, so we no longer need the stub function here.
This commit is contained in:
parent
bc8e5f6837
commit
9ae8918156
@ -3,14 +3,13 @@ import {spawn} from 'child_process';
|
|||||||
let grist;
|
let grist;
|
||||||
|
|
||||||
function startGrist(newConfig={}) {
|
function startGrist(newConfig={}) {
|
||||||
saveNewConfig(newConfig);
|
|
||||||
// H/T https://stackoverflow.com/a/36995148/11352427
|
// H/T https://stackoverflow.com/a/36995148/11352427
|
||||||
grist = spawn('./sandbox/run.sh', {
|
grist = spawn('./sandbox/run.sh', {
|
||||||
stdio: ['inherit', 'inherit', 'inherit', 'ipc']
|
stdio: ['inherit', 'inherit', 'inherit', 'ipc']
|
||||||
});
|
});
|
||||||
grist.on('message', function(data) {
|
grist.on('message', function(data) {
|
||||||
if (data.action === 'restart') {
|
if (data.action === 'restart') {
|
||||||
console.log('Restarting Grist with new environment');
|
console.log('Restarting Grist with new configuration');
|
||||||
|
|
||||||
// Note that we only set this event handler here, after we have
|
// Note that we only set this event handler here, after we have
|
||||||
// a new environment to reload with. Small chance of a race here
|
// a new environment to reload with. Small chance of a race here
|
||||||
@ -26,10 +25,4 @@ function startGrist(newConfig={}) {
|
|||||||
return grist;
|
return grist;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stub function
|
|
||||||
function saveNewConfig(newConfig) {
|
|
||||||
// TODO: something here to actually persist the new config before
|
|
||||||
// restarting Grist.
|
|
||||||
}
|
|
||||||
|
|
||||||
startGrist();
|
startGrist();
|
||||||
|
Loading…
Reference in New Issue
Block a user