1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#!/usr/bin/env python3 import time import aurweb.db def main(): conn = aurweb.db.Connection() limit_to = int(time.time()) - 86400 conn.execute("DELETE FROM PackageBases WHERE " + "SubmittedTS < ? AND PackagerUID IS NULL", [limit_to]) conn.commit() conn.close() if __name__ == '__main__': main()