Shutdown command
Summary: Introduce a 'shutdown' command which effectively kills the process. Killing the process, for flipper-server, will close down the server and active ws connections. Reviewed By: passy Differential Revision: D37209193 fbshipit-source-id: 83303e8209530a41ba870009603cfb383915b7a6
This commit is contained in:
committed by
Facebook GitHub Bot
parent
3e72831699
commit
2e9ab310bd
@@ -299,6 +299,7 @@ export type FlipperServerCommands = {
|
|||||||
'intern-upload-scribe-logs': (
|
'intern-upload-scribe-logs': (
|
||||||
messages: {category: string; message: string}[],
|
messages: {category: string; message: string}[],
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
|
shutdown: () => Promise<void>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type GraphResponse = {
|
export type GraphResponse = {
|
||||||
|
|||||||
@@ -478,6 +478,9 @@ export class FlipperServerImpl implements FlipperServer {
|
|||||||
return internGraphGETAPIRequest(endpoint, params, options, token);
|
return internGraphGETAPIRequest(endpoint, params, options, token);
|
||||||
},
|
},
|
||||||
'intern-upload-scribe-logs': sendScribeLogs,
|
'intern-upload-scribe-logs': sendScribeLogs,
|
||||||
|
shutdown: async () => {
|
||||||
|
process.exit(0);
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
registerDevice(device: ServerDevice) {
|
registerDevice(device: ServerDevice) {
|
||||||
|
|||||||
Reference in New Issue
Block a user