mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Instead of using configparser and mysql.connector directly, change all Python scripts to use the config and db Python modules which are now accessible from a common location. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
18 lines
320 B
Python
Executable file
18 lines
320 B
Python
Executable file
#!/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()
|