@@ -214,9 +214,10 @@ class CacheModule extends CoreClass {
value = JSON.stringify(value);
//pubs[channel].publish(channel, value);
- this.client.publish(payload.channel, value);
-
- resolve();
+ this.client.publish(payload.channel, value, (err, res) => {
+ if (err) reject(err);
+ else resolve();
+ });
});
}
@@ -153,8 +153,9 @@ class NotificationsModule extends CoreClass {
"PX",
time,
"NX",
- () => {
+ (err) => {
);
@@ -237,10 +238,12 @@ class NotificationsModule extends CoreClass {
crypto
.createHash("md5")
.update(`_notification:${payload.name}_`)
- .digest("hex")
+ .digest("hex"),
+ }
@@ -228,7 +228,7 @@ class StationsModule extends CoreClass {
.catch();
this.notifications
.runJob("SUBSCRIBE", {
- subscription: `stations.nextSong?id=${station._id}`,
+ name: `stations.nextSong?id=${station._id}`,
cb: () =>
this.runJob("SKIP_STATION", {
stationId: station._id,