mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-09 23:48:36 +01:00
fix ui + sessions + reactivity
This commit is contained in:
@@ -22,7 +22,7 @@ export async function startStreamLoop() {
|
||||
delay: { base: 100, empty: 5000 },
|
||||
readBlock: 2500
|
||||
}, processStreamEvent);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -97,6 +97,11 @@ async function process_keep_alive(data: Record<string, string>, sessionHash: str
|
||||
|
||||
const { pid, instant, flowHash } = data;
|
||||
|
||||
const existingSession = await SessionModel.findOne({ project_id: pid }, { _id: 1 });
|
||||
if (!existingSession) {
|
||||
await ProjectCountModel.updateOne({ project_id: pid }, { $inc: { 'sessions': 1 } }, { upsert: true });
|
||||
}
|
||||
|
||||
if (instant == "true") {
|
||||
await SessionModel.updateOne({ project_id: pid, session: sessionHash, }, {
|
||||
$inc: { duration: 0 },
|
||||
|
||||
Reference in New Issue
Block a user