Skip to content
Snippets Groups Projects
Commit 4149bcac authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

add index on stanza_id column to speed up de-duplication when syncing logs

parent 958c898e
No related branches found
No related tags found
No related merge requests found
...@@ -245,6 +245,8 @@ class OptionsParser: ...@@ -245,6 +245,8 @@ class OptionsParser:
self.update_config_to_0982() self.update_config_to_0982()
if old < [0, 98, 3] and new >= [0, 98, 3]: if old < [0, 98, 3] and new >= [0, 98, 3]:
self.update_config_to_0983() self.update_config_to_0983()
if old < [0, 99, 2] and new >= [0, 99, 2]:
self.update_config_to_0992()
app.logger.init_vars() app.logger.init_vars()
app.logger.attach_cache_database() app.logger.attach_cache_database()
...@@ -929,3 +931,12 @@ class OptionsParser: ...@@ -929,3 +931,12 @@ class OptionsParser:
elif password == "libsecret:": elif password == "libsecret:":
app.config.set_per('accounts', account, 'password', '') app.config.set_per('accounts', account, 'password', '')
app.config.set('version', '0.98.3') app.config.set('version', '0.98.3')
def update_config_to_0992(self):
self.call_sql(logger.LOG_DB_PATH,
'''
CREATE INDEX IF NOT EXISTS
idx_logs_stanza_id ON logs (stanza_id);
'''
)
app.config.set('version', '0.99.2')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment