Skip to content

Commit bfd9435

Browse files
committed
Publish for Notification should happen after xAdd
1 parent b17a355 commit bfd9435

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • lib/mobility-core/src/Kernel/External/Notification/GRPC

lib/mobility-core/src/Kernel/External/Notification/GRPC/Flow.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ notifyPerson cfg notificationData = Hedis.runInMasterCloudRedisCell $ do
4444
[startUuid, midOneUuid, _, _] -> T.intercalate "-" [startUuid, midOneUuid]
4545
_ -> notificationData.streamId
4646
let object = NotificationMessage notificationStreamId now
47-
_ <- Hedis.withCrossAppRedis $ Hedis.publish "active-notification" object
4847
void $ Hedis.withCrossAppRedis $ Hedis.xAddExp ("N" <> notificationStreamId <> "{" <> (show shardId) <> "}") "*" (buildFieldValue notificationData now) cfg.streamExpirationTime
48+
void $ Hedis.withCrossAppRedis $ Hedis.publish "active-notification" object
4949
where
5050
buildFieldValue notifData createdAt =
5151
[ ("entity.id", TE.encodeUtf8 notifData.entityId),

0 commit comments

Comments
 (0)