Browse Source

fix: stations automatically skipping was broken after Redis upgrade

Kristian Vos 2 years ago
parent
commit
567b3609a3
1 changed files with 4 additions and 7 deletions
  1. 4 7
      backend/logic/notifications.js

+ 4 - 7
backend/logic/notifications.js

@@ -167,13 +167,10 @@ class _NotificationsModule extends CoreClass {
 						.digest("hex")}; StationId: ${payload.station._id}; StationName: ${payload.station.name}`
 				);
 				NotificationsModule.pub
-					.SET(
-						crypto.createHash("md5").update(`_notification:${payload.name}_`).digest("hex"),
-						"",
-						"PX",
-						time,
-						"NX"
-					)
+					.SET(crypto.createHash("md5").update(`_notification:${payload.name}_`).digest("hex"), "", {
+						PX: time,
+						NX: true
+					})
 					.then(() => resolve())
 					.catch(err => reject(new Error(err)));
 			}