File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 17
17
along with this program. If not, see <https://www.gnu.org/licenses/>.
18
18
*/
19
19
20
- require_once (" bootstrap.php " );
20
+ require_once (__DIR__ . " / bootstrap.php " );
21
21
22
22
if (!isCLI ()) {
23
23
exit ("cli only, bye. " );
33
33
$ api ->connect ();
34
34
$ db = $ api ->getDB ();
35
35
36
- // TODO: Write flag for if this is done or not.
37
36
$ runCount = 0 ;
38
37
$ deletedCount = 0 ;
39
38
while (true ) {
40
39
// Delete temporary users, and their private patterns, when they have no session.
41
40
$ users = $ db ->execute ("SELECT u.id as userId
42
41
FROM users as u
43
42
LEFT JOIN sessions as s ON s.userId=u.id
44
- WHERE u.type='temporary' && s.id IS NULL LIMIT 100000 " );
43
+ WHERE u.type='temporary' && s.id IS NULL LIMIT 10000 " );
45
44
46
45
$ tmpUserCount = count ($ users );
47
46
You can’t perform that action at this time.
0 commit comments