mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Avoid using UNIX_TIMESTAMP which is not part of the SQL standard.
See f2a6bd2
(git-interface: Do not use UNIX_TIMESTAMP, 2016-08-05) for
related changes.
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
20 lines
340 B
Python
Executable file
20 lines
340 B
Python
Executable file
#!/usr/bin/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()
|