fix(striker-ui-api): disable toush session

main
Tsu-ba-me 1 year ago
parent a7709df2a6
commit 6d878e8eb0
  1. 34
      striker-ui-api/src/middlewares/session.ts

@ -146,21 +146,25 @@ export class SessionStore extends BaseSessionStore {
): Promise<void> { ): Promise<void> {
stdoutVar({ session }, `Touch session ${sid}: `); stdoutVar({ session }, `Touch session ${sid}: `);
try { // The intent of updating the session modified date is to avoid expiring the
const wcode = await write( // session when it's actively used by the user. But since the updates are
`UPDATE sessions // flooding the database's history table, disable it for now.
SET modified_date = '${timestamp()}'
WHERE session_uuid = '${sid}';`, // try {
); // const wcode = await write(
// `UPDATE sessions
assert(wcode === 0, `Write exited with code ${wcode}`); // SET modified_date = '${timestamp()}'
} catch (error) { // WHERE session_uuid = '${sid}';`,
stderr( // );
`Failed to complete DB write in touch session ${sid}; CAUSE: ${error}`,
); // assert(wcode === 0, `Write exited with code ${wcode}`);
// } catch (error) {
return done?.call(null, error); // stderr(
} // `Failed to complete DB write in touch session ${sid}; CAUSE: ${error}`,
// );
// return done?.call(null, error);
// }
return done?.call(null); return done?.call(null);
} }

Loading…
Cancel
Save