Files
pezkuwi-telegram-miniapp/supabase/migrations/20261018_deposit_cron_every_5min.sql
T
SatoshiQaziMuhammed 90955269df chore(check-deposits): run the deposit check every five minutes (#40)
A run walks every user's TRC20 address at ~4 TronGrid requests a second,
so a one-minute schedule stops fitting at roughly 150 users. Five minutes
leaves room to grow; deposits are detected up to five minutes later.
2026-10-19 10:16:21 +04:00

11 lines
512 B
SQL

-- Check deposits every five minutes instead of every minute. Each run walks
-- every user's TRC20 address at ~4 TronGrid requests a second, so a
-- one-minute schedule stops fitting at roughly 150 users; five minutes keeps
-- headroom for growth at the cost of up to five minutes' detection delay.
--
-- The job is owned by supabase_admin, so this must be applied as that role.
SELECT cron.alter_job(
job_id := (SELECT jobid FROM cron.job WHERE jobname = 'check-deposits-job'),
schedule := '*/5 * * * *'
);