Don't depend on notification server to run. stinky
This commit is contained in:
parent
4b6d192a93
commit
6232258ce6
1 changed files with 10 additions and 9 deletions
19
index.js
19
index.js
|
@ -284,17 +284,18 @@ const socket = io.connect(`http://${process.env.NOTIFICATION_SERVER_INSTANCE}:${
|
|||
|
||||
socket.on('connect', function (s) {
|
||||
console.log('Successfully connected to notification server');
|
||||
try {
|
||||
main();
|
||||
} catch (err) {
|
||||
socket.emit('nodeMessage', {
|
||||
message: `LastFMDownloader error - ${err}`,
|
||||
password: process.env.NOTIFICATION_SERVER_PASSWORD
|
||||
})
|
||||
throw err;
|
||||
}
|
||||
});
|
||||
|
||||
try {
|
||||
main();
|
||||
} catch (err) {
|
||||
socket.emit('nodeMessage', {
|
||||
message: `LastFMDownloader error - ${err}`,
|
||||
password: process.env.NOTIFICATION_SERVER_PASSWORD
|
||||
})
|
||||
throw err;
|
||||
}
|
||||
|
||||
function dismantle() {
|
||||
socket.disconnect();
|
||||
return null;
|
||||
|
|
Loading…
Reference in a new issue