v1.6.0(beta) - add automated daily cron job for inactive user deletion #237
daviddprtma
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Description of Changes
Implemented an automated backend cron job to optimize database storage by cleaning up inactive user accounts. by @dhruv-gupta-dev in #231
-Database: Created a Supabase migration script to safely add the last_active_at timestamp column to public.profiles. by @dhruv-gupta-dev in #231
-Middleware: Updated requireAuth in backend/src/middleware/auth.js to asynchronously update user activity timestamps without blocking requests. by @dhruv-gupta-dev in #231
-Cron Service: Built a daily background task (node-cron) in backend/src/services/cron.js that loops through and deletes users inactive for 30, 60, or 365 days using supabase.auth.admin.deleteUser(). by @dhruv-gupta-dev in #231
You can support AgroDex project for Indonesian agriculture in here https://github.com/sponsors/daviddprtma
This discussion was created from the release v1.6.0(beta) - add automated daily cron job for inactive user deletion.
All reactions