scripts: Do not use UNIX_TIMESTAMP
[aur.git] / scripts / pkgmaint.py
blob3ad9ed8d5480712e7671145c4b85e2cdab5c43c7
1 #!/usr/bin/python3
3 import time
5 import aurweb.db
8 def main():
9 conn = aurweb.db.Connection()
11 limit_to = int(time.time()) - 86400
12 conn.execute("DELETE FROM PackageBases WHERE " +
13 "SubmittedTS < ? AND PackagerUID IS NULL", [limit_to])
15 conn.commit()
16 conn.close()
19 if __name__ == '__main__':
20 main()