Hotfixes and CI/CD
Some checks failed
Build and Deploy / build-and-deploy (push) Failing after 3m51s

This commit is contained in:
Antoni Nuñez Romeu
2026-04-17 15:33:19 +02:00
parent b3f7d6bf98
commit 114fda056d
24 changed files with 2806 additions and 53 deletions

View File

@@ -75,6 +75,16 @@ grant usage on schema public to anon, authenticated;
grant all on table timers to anon, authenticated;
```
### Automatic Session Closure (Optional)
To automatically close active sessions at midnight every day (without deleting history):
1. Make sure the `pg_cron` extension is enabled in your Supabase project (it's usually enabled by default)
2. Run the SQL script in `supabase/close_sessions_cron.sql` in your Supabase SQL Editor
3. The cron job will automatically run daily at 00:00 to close any active sessions
The function identifies sessions that are currently active (where `end_time` is NULL) and sets their `end_time` to midnight, calculating the duration accordingly. This preserves all session history while ensuring no session remains indefinitely open.
## Session Management Features
### Creating New Sessions