forked from LBRYCommunity/lbry-sdk
fix allowed_during_startup
This commit is contained in:
parent
d3bf097687
commit
4e5ff49177
4 changed files with 9 additions and 5 deletions
|
@ -25,6 +25,7 @@ at anytime.
|
|||
* Fixed daemon process hanging when started without an internet connection
|
||||
* Fixed https://github.com/lbryio/lbry/issues/774
|
||||
* Fix XDG compliance on Linux
|
||||
* Fixed https://github.com/lbryio/lbry/issues/760
|
||||
|
||||
### Deprecated
|
||||
*
|
||||
|
|
|
@ -165,11 +165,12 @@ class Daemon(AuthJSONRPCServer):
|
|||
LBRYnet daemon, a jsonrpc interface to lbry functions
|
||||
"""
|
||||
|
||||
allowed_during_startup = [
|
||||
'daemon_stop', 'status', 'version',
|
||||
]
|
||||
|
||||
def __init__(self, root, analytics_manager):
|
||||
AuthJSONRPCServer.__init__(self, conf.settings['use_auth_http'])
|
||||
self.allowed_during_startup = [
|
||||
'stop', 'status', 'version',
|
||||
]
|
||||
self.db_dir = conf.settings['data_dir']
|
||||
self.download_directory = conf.settings['download_directory']
|
||||
if conf.settings['BLOBFILES_DIR'] == "blobfiles":
|
||||
|
|
|
@ -82,7 +82,9 @@ def main():
|
|||
suggest_help=False)
|
||||
return 1
|
||||
|
||||
if status['startup_status']['code'] != "started":
|
||||
status_code = status['startup_status']['code']
|
||||
|
||||
if status_code != "started" and method not in Daemon.allowed_during_startup:
|
||||
print "Daemon is in the process of starting. Please try again in a bit."
|
||||
message = status['startup_status']['message']
|
||||
if message:
|
||||
|
|
|
@ -192,6 +192,7 @@ class AuthJSONRPCServer(AuthorizedBase):
|
|||
implements(resource.IResource)
|
||||
|
||||
isLeaf = True
|
||||
allowed_during_startup = []
|
||||
|
||||
def __init__(self, use_authentication=None):
|
||||
self._call_lock = {}
|
||||
|
@ -199,7 +200,6 @@ class AuthJSONRPCServer(AuthorizedBase):
|
|||
use_authentication if use_authentication is not None else conf.settings['use_auth_http']
|
||||
)
|
||||
self.announced_startup = False
|
||||
self.allowed_during_startup = []
|
||||
self.sessions = {}
|
||||
|
||||
def setup(self):
|
||||
|
|
Loading…
Reference in a new issue