fix: auth scheduler env vars, concurrency and browser stability
This commit is contained in:
20
docs/outcomes/FixAuthSchedulerEnvVars.md
Normal file
20
docs/outcomes/FixAuthSchedulerEnvVars.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# Outcome - Fix Auth Scheduler Env Vars
|
||||
|
||||
## Summary
|
||||
Successfully fixed the environment variable loading issue in the authentication scheduler and updated the frequency configuration to support minutes.
|
||||
|
||||
## Changes
|
||||
- **Refactored Scheduler Logic:**
|
||||
- Updated `src/lib/server/scheduler.ts` to use `$env/dynamic/private` for reliable environment variable access.
|
||||
- Changed configuration from `intervalHours` to `intervalMinutes`.
|
||||
- Updated `startScheduler` to calculate interval in milliseconds based on minutes.
|
||||
- **Updated Documentation:**
|
||||
- Updated `src/hooks.server.ts` JSDoc to reflect the new configuration.
|
||||
- **Updated Configuration:**
|
||||
- Updated `.env.local` to set `AUTH_SCHEDULER_INTERVAL_MINUTES=5`.
|
||||
- **Verified Tests:**
|
||||
- Updated `src/tests/scheduler.spec.ts` to mock `$env/dynamic/private` and verify the new logic.
|
||||
- All tests passed.
|
||||
|
||||
## Feature Branch
|
||||
`feature/FixAuthSchedulerEnvVars`
|
||||
Reference in New Issue
Block a user