forked from LBRYCommunity/lbry-sdk
change filemanger setup to inlinecallbacks
This commit is contained in:
parent
dbb6c6f3a4
commit
520ac9b50a
1 changed files with 11 additions and 10 deletions
|
@ -649,18 +649,19 @@ class Daemon(AuthJSONRPCServer):
|
||||||
session_id=self._session_id
|
session_id=self._session_id
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@defer.inlineCallbacks
|
||||||
def _setup_lbry_file_manager(self):
|
def _setup_lbry_file_manager(self):
|
||||||
|
log.info('Starting to setup up file manager')
|
||||||
self.startup_status = STARTUP_STAGES[3]
|
self.startup_status = STARTUP_STAGES[3]
|
||||||
d = self.stream_info_manager.setup()
|
yield self.stream_info_manager.setup()
|
||||||
|
self.lbry_file_manager = EncryptedFileManager(
|
||||||
def set_lbry_file_manager():
|
self.session,
|
||||||
self.lbry_file_manager = EncryptedFileManager(
|
self.stream_info_manager,
|
||||||
self.session, self.stream_info_manager,
|
self.sd_identifier,
|
||||||
self.sd_identifier, download_directory=self.download_directory)
|
download_directory=self.download_directory
|
||||||
return self.lbry_file_manager.setup()
|
)
|
||||||
|
yield self.lbry_file_manager.setup()
|
||||||
d.addCallback(lambda _: set_lbry_file_manager())
|
log.info('Done setting up file manager')
|
||||||
return d
|
|
||||||
|
|
||||||
def _get_analytics(self):
|
def _get_analytics(self):
|
||||||
if not self.analytics_manager.is_started:
|
if not self.analytics_manager.is_started:
|
||||||
|
|
Loading…
Reference in a new issue