Disable DB updating command line argument
This commit is contained in:
parent
99f0407ba2
commit
ae092dc757
2 changed files with 2 additions and 1 deletions
|
@ -146,6 +146,7 @@ class Config(object):
|
||||||
self.parser.add_argument('--trackers_file', help='Load torrent trackers dynamically from a file', default=False, metavar='path')
|
self.parser.add_argument('--trackers_file', help='Load torrent trackers dynamically from a file', default=False, metavar='path')
|
||||||
self.parser.add_argument('--use_openssl', help='Use OpenSSL liblary for speedup',
|
self.parser.add_argument('--use_openssl', help='Use OpenSSL liblary for speedup',
|
||||||
type='bool', choices=[True, False], default=use_openssl)
|
type='bool', choices=[True, False], default=use_openssl)
|
||||||
|
self.parser.add_argument('--disable_db', help='Disable database updating', action='store_true')
|
||||||
self.parser.add_argument('--disable_encryption', help='Disable connection encryption', action='store_true')
|
self.parser.add_argument('--disable_encryption', help='Disable connection encryption', action='store_true')
|
||||||
self.parser.add_argument('--disable_sslcompression', help='Disable SSL compression to save memory',
|
self.parser.add_argument('--disable_sslcompression', help='Disable SSL compression to save memory',
|
||||||
type='bool', choices=[True, False], default=True)
|
type='bool', choices=[True, False], default=True)
|
||||||
|
|
|
@ -184,7 +184,7 @@ class SiteStorage:
|
||||||
# Reopen DB to check changes
|
# Reopen DB to check changes
|
||||||
self.closeDb()
|
self.closeDb()
|
||||||
self.openDb()
|
self.openDb()
|
||||||
elif inner_path.endswith(".json") and self.has_db: # Load json file to db
|
elif not config.disable_db and inner_path.endswith(".json") and self.has_db: # Load json file to db
|
||||||
self.log.debug("Loading json file to db: %s" % inner_path)
|
self.log.debug("Loading json file to db: %s" % inner_path)
|
||||||
try:
|
try:
|
||||||
self.getDb().loadJson(file_path)
|
self.getDb().loadJson(file_path)
|
||||||
|
|
Loading…
Reference in a new issue