Use super threaded db connection
This commit is contained in:
1 parent
93f4b8b537
commit
81f9302da1
2 files changed
+3
-6
No files matched your search
@@ -54,10 +54,7 @@ class MovieSearcher(SearcherBase, MovieTypeBase):
|
|||||||
})
|
})
|
||||||
|
|
||||||
if self.conf('run_on_launch'):
|
if self.conf('run_on_launch'):
|
||||||
def on_load():
|
addEvent('app.load', self.searchAll)
|
||||||
time.sleep(.1)
|
|
||||||
self.searchAll()
|
|
||||||
addEvent('app.load', on_load, priority = 1000)
|
|
||||||
|
|
||||||
def searchAllView(self, **kwargs):
|
def searchAllView(self, **kwargs):
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import warnings
|
|||||||
import re
|
import re
|
||||||
import tarfile
|
import tarfile
|
||||||
|
|
||||||
from CodernityDB.database_thread_safe import ThreadSafeDatabase
|
from CodernityDB.database_super_thread_safe import SuperThreadSafeDatabase
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
from cache import FileSystemCache
|
from cache import FileSystemCache
|
||||||
from couchpotato import KeyHandler, LoginHandler, LogoutHandler
|
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'))
|
db_path = toUnicode(os.path.join(data_dir, 'database'))
|
||||||
|
|
||||||
# Check if database exists
|
# Check if database exists
|
||||||
db = ThreadSafeDatabase(db_path)
|
db = SuperThreadSafeDatabase(db_path)
|
||||||
db_exists = db.exists()
|
db_exists = db.exists()
|
||||||
if db_exists:
|
if db_exists:
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user