Use super threaded db connection

This commit is contained in:
Ruud
2014-05-11 00:19:05 +02:00
parent 93f4b8b537
commit 81f9302da1
2 changed files with 3 additions and 6 deletions
+1 -4
View File
@@ -54,10 +54,7 @@ class MovieSearcher(SearcherBase, MovieTypeBase):
})
if self.conf('run_on_launch'):
def on_load():
time.sleep(.1)
self.searchAll()
addEvent('app.load', on_load, priority = 1000)
addEvent('app.load', self.searchAll)
def searchAllView(self, **kwargs):
+2 -2
View File
@@ -10,7 +10,7 @@ import warnings
import re
import tarfile
from CodernityDB.database_thread_safe import ThreadSafeDatabase
from CodernityDB.database_super_thread_safe import SuperThreadSafeDatabase
from argparse import ArgumentParser
from cache import FileSystemCache
from couchpotato import KeyHandler, LoginHandler, LogoutHandler
@@ -89,7 +89,7 @@ def runCouchPotato(options, base_path, args, data_dir = None, log_dir = None, En
db_path = toUnicode(os.path.join(data_dir, 'database'))
# Check if database exists
db = ThreadSafeDatabase(db_path)
db = SuperThreadSafeDatabase(db_path)
db_exists = db.exists()
if db_exists: