restore one deprecated method (for now)
This commit is contained in:
parent
f050337dbc
commit
53acb2d9cd
1 changed files with 29 additions and 1 deletions
|
@ -202,7 +202,12 @@ class Daemon(AuthJSONRPCServer):
|
||||||
AuthJSONRPCServer.__init__(self, conf.settings.use_auth_http)
|
AuthJSONRPCServer.__init__(self, conf.settings.use_auth_http)
|
||||||
reactor.addSystemEventTrigger('before', 'shutdown', self._shutdown)
|
reactor.addSystemEventTrigger('before', 'shutdown', self._shutdown)
|
||||||
|
|
||||||
self.allowed_during_startup = ['get_time_behind_blockchain', 'stop','status', 'version']
|
self.allowed_during_startup = [
|
||||||
|
'stop', 'status', 'version',
|
||||||
|
# delete these once they are fully removed:
|
||||||
|
'is_running', 'is_first_run', 'get_time_behind_blockchain', 'daemon_status',
|
||||||
|
'get_start_notice',
|
||||||
|
]
|
||||||
last_version = {'last_version': {'lbrynet': lbrynet_version, 'lbryum': lbryum_version}}
|
last_version = {'last_version': {'lbrynet': lbrynet_version, 'lbryum': lbryum_version}}
|
||||||
conf.settings.update(last_version)
|
conf.settings.update(last_version)
|
||||||
self.db_dir = conf.settings.data_dir
|
self.db_dir = conf.settings.data_dir
|
||||||
|
@ -2443,6 +2448,29 @@ class Daemon(AuthJSONRPCServer):
|
||||||
return self._render_response(True)
|
return self._render_response(True)
|
||||||
return self._render_response("Not using authentication")
|
return self._render_response("Not using authentication")
|
||||||
|
|
||||||
|
def jsonrpc_get_start_notice(self):
|
||||||
|
"""
|
||||||
|
DEPRECATED.
|
||||||
|
|
||||||
|
Get special message to be displayed at startup
|
||||||
|
Args:
|
||||||
|
None
|
||||||
|
Returns:
|
||||||
|
Startup message, such as first run notification
|
||||||
|
"""
|
||||||
|
|
||||||
|
def _get_startup_message(resp):
|
||||||
|
status = resp['result']
|
||||||
|
if status['is_first_run'] and self.session.wallet.wallet_balance:
|
||||||
|
return self._render_response(None)
|
||||||
|
else:
|
||||||
|
return self._render_response(status['startup_status']['message'])
|
||||||
|
|
||||||
|
d = self.jsonrpc_status()
|
||||||
|
d.addCallback(_get_startup_message)
|
||||||
|
return d
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def get_lbryum_version_from_github():
|
def get_lbryum_version_from_github():
|
||||||
return get_version_from_github('https://api.github.com/repos/lbryio/lbryum/releases/latest')
|
return get_version_from_github('https://api.github.com/repos/lbryio/lbryum/releases/latest')
|
||||||
|
|
Loading…
Add table
Reference in a new issue