From 1e8f6f78dba0920e05f87a2cf5e9b6b7201156d5 Mon Sep 17 00:00:00 2001 From: Emily Date: Sun, 9 Jun 2024 19:29:39 +0200 Subject: [PATCH] fix keep_alive --- producer/src/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/producer/src/index.ts b/producer/src/index.ts index 001c54d..f1cb8f9 100644 --- a/producer/src/index.ts +++ b/producer/src/index.ts @@ -53,7 +53,10 @@ app.post('/keep_alive', express.json(jsonOptions), async (req, res) => { try { const ip = getIPFromRequest(req); const sessionHash = createSessionHash(req.body.website, ip, req.body.userAgent); - await RedisStreamService.addToStream(streamName, { ...req.body, _type: 'keep_alive', sessionHash, ip }); + await RedisStreamService.addToStream(streamName, { + ...req.body, _type: 'keep_alive', sessionHash, ip, + instant: req.body.instant + '' + }); return res.sendStatus(200); } catch (ex: any) { return res.status(500).json({ error: ex.message });