pkgmaint.py 340 Bytes
Newer Older
1
2
#!/usr/bin/python3

3
4
import time

Lukas Fleischer's avatar
Lukas Fleischer committed
5
import aurweb.db
6
7


8
def main():
Lukas Fleischer's avatar
Lukas Fleischer committed
9
    conn = aurweb.db.Connection()
10

11
    limit_to = int(time.time()) - 86400
Lukas Fleischer's avatar
Lukas Fleischer committed
12
    conn.execute("DELETE FROM PackageBases WHERE " +
13
                 "SubmittedTS < ? AND PackagerUID IS NULL", [limit_to])
14

Lukas Fleischer's avatar
Lukas Fleischer committed
15
16
    conn.commit()
    conn.close()
17
18
19
20


if __name__ == '__main__':
    main()