mirror of
https://github.com/pezkuwichain/pezkuwi-telegram-miniapp.git
synced 2026-11-28 05:19:58 +00:00
chore(check-deposits): run the deposit check every five minutes
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.
This commit is contained in:
1 parent
a781e456e3
commit
5e68c4d17e
1 file changed
+10
@@ -0,0 +1,10 @@
|
||||
-- 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 * * * *'
|
||||
);
|
||||
Reference in new issue
Block a user