fix: update estimated wait time calculation in queue updates
This commit is contained in:
@@ -45,7 +45,7 @@ function broadcastUpdate(eventId, io) {
|
||||
io.to(sid).emit("queue_update", {
|
||||
activeCount: ev.sockets.size,
|
||||
position: pos === -1 ? null : pos + 1,
|
||||
estimatedWait: pos === -1 ? null : ev.queue.length * 5,
|
||||
estimatedWait: pos === -1 ? null : pos * TOKEN_TTL_SECONDS,
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -226,7 +226,7 @@ export async function GET(req) {
|
||||
io.to(socket.id).emit("queue_update", {
|
||||
activeCount: ev.sockets.size,
|
||||
position: pos === -1 ? null : pos + 1,
|
||||
estimatedWait: pos === -1 ? null : ev.queue.length * 5,
|
||||
estimatedWait: pos === -1 ? null : pos * TOKEN_TTL_SECONDS,
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user