1
0
Fork 0
mirror of synced 2024-05-20 12:32:26 +12:00

Fixed an issue where cache would update even on a get request, causing an infinite loop

This commit is contained in:
Phxntxm 2017-03-19 22:11:14 -05:00
parent c0c135fb3d
commit 67d6c43e96

View file

@ -145,6 +145,8 @@ async def add_content(table, content):
await conn.close()
log.info("RethinkDB Instance closed. Table: {}---Content: {}---Method = add_content".format(table, content))
if table == 'prefixes' or table == 'server_settings':
loop.create_task(cache[table].update())
return result.get('inserted', 0) > 0
@ -225,8 +227,6 @@ async def get_content(table, key=None):
await conn.close()
log.info("RethinkDB Instance closed. Table: {}---Key: {}---Method: get_content".format(table, key))
if table == 'prefixes' or table == 'server_settings':
loop.create_task(cache[table].update())
return content
async def filter_content(table: str, r_filter):