summaryrefslogtreecommitdiffstats
path: root/scripts/pkgmaint.py
blob: d0f8fe70918df268e0ec38cf9bbf41c1bb79dd2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/python3

import aurweb.db


def main():
    conn = aurweb.db.Connection()

    conn.execute("DELETE FROM PackageBases WHERE " +
                 "UNIX_TIMESTAMP() - SubmittedTS > 86400 " +
                 "AND PackagerUID IS NULL")

    conn.commit()
    conn.close()


if __name__ == '__main__':
    main()