koji-sweep-db: Turn on autocommit to eliminate VACUUMing errors
psycopg2 leaves transactions open by default, which causes VACUUM to fail. Turning on autocommit disables this behavior.
This commit is contained in:
parent
c292242d97
commit
a668aaccd8
1 changed files with 1 additions and 0 deletions
|
|
@ -81,6 +81,7 @@ if __name__ == "__main__":
|
|||
port=opts.get("DBPort", None))
|
||||
|
||||
conn = koji.db.connect()
|
||||
conn.set_session(autocommit=True)
|
||||
cursor = conn.cursor()
|
||||
|
||||
clean_sessions(cursor, options.vacuum)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue