This is a Node.js application that starts a cron job to end active sessions. First, the session ender checks for any sessions in the Postgres database that have ended based on an idle timeout. When the it identifies any sessions that have timed out, it removes the pending session data from the Postgres database and moves it into the Clickhouse database where the data will persist.
Clone the open source reposatory from Here. Run the application using:
npm run start
You can read more about our project here.