Age in protonmsg config file is deprecated
Fixes: https://pagure.io/koji/issue/3332
This commit is contained in:
parent
f72f033465
commit
ff500a2c4e
1 changed files with 6 additions and 2 deletions
|
|
@ -361,8 +361,12 @@ def handle_db_msgs(urls, CONFIG):
|
||||||
LOG.debug('skipping db queue due to lock')
|
LOG.debug('skipping db queue due to lock')
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
c.execute("DELETE FROM proton_queue WHERE created_ts < NOW() -'%s hours'::interval" %
|
max_age = CONFIG.getint('queue', 'max_age', fallback=None)
|
||||||
CONFIG.getint('queue', 'age', fallback=24))
|
if not max_age:
|
||||||
|
# age in config file is deprecated
|
||||||
|
max_age = CONFIG.getint('queue', 'age', fallback=24)
|
||||||
|
c.execute("DELETE FROM proton_queue WHERE created_ts < NOW() -'%s hours'::interval"
|
||||||
|
% max_age)
|
||||||
query = QueryProcessor(tables=('proton_queue',),
|
query = QueryProcessor(tables=('proton_queue',),
|
||||||
columns=('id', 'address', 'props', 'body::TEXT'),
|
columns=('id', 'address', 'props', 'body::TEXT'),
|
||||||
aliases=('id', 'address', 'props', 'body'),
|
aliases=('id', 'address', 'props', 'body'),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue