mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-09-24 04:10:33 +00:00
backups: purge outdated shares
This commit is contained in:
parent
8444523b98
commit
0075e26208
1 changed files with 2 additions and 0 deletions
|
@ -42,6 +42,7 @@ function BackendCleanDatabase()
|
|||
dborun("delete from hashstats where time<$delay");
|
||||
dborun("delete from payouts where time<$delay");
|
||||
dborun("delete from rentertxs where time<$delay");
|
||||
dborun("DELETE FROM shares WHERE time<$delay");
|
||||
|
||||
$delay = time() - 2*24*60*60;
|
||||
dborun("delete from stats where time<$delay");
|
||||
|
@ -50,6 +51,7 @@ function BackendCleanDatabase()
|
|||
dborun("delete from hashrenter where time<$delay");
|
||||
dborun("delete from balanceuser where time<$delay");
|
||||
dborun("delete from exchange where send_time<$delay");
|
||||
dborun("DELETE FROM shares WHERE time<$delay AND coinid NOT IN (select id from coins)");
|
||||
|
||||
$delay = time() - 12*60*60;
|
||||
dborun("delete from earnings where status=2 and mature_time<$delay");
|
||||
|
|
Loading…
Add table
Reference in a new issue