mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-25 15:49:59 +00:00
Gracefully shutdown node_helpers (Fixes #1056)
Updated documentation Corrected Typo in Documentation Style correction
This commit is contained in:
@@ -555,6 +555,17 @@ start: function() {
|
||||
}
|
||||
````
|
||||
|
||||
#### `stop()`
|
||||
This method is called when the MagicMirror server receives a `SIGINT` command and is shutting down. This method should include any commands needed to close any open connections, stop any sub-processes and gracefully exit the module.
|
||||
|
||||
**Example:**
|
||||
````javascript
|
||||
stop: function() {
|
||||
console.log("Shutting down MyModule");
|
||||
this.connection.close();
|
||||
}
|
||||
````
|
||||
|
||||
#### `socketNotificationReceived: function(notification, payload)`
|
||||
With this method, your node helper can receive notifications from your modules. When this method is called, it has 2 arguments:
|
||||
|
||||
|
Reference in New Issue
Block a user