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
|
||||
)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def _setup_lbry_file_manager(self):
|
||||
log.info('Starting to setup up file manager')
|
||||
self.startup_status = STARTUP_STAGES[3]
|
||||
d = self.stream_info_manager.setup()
|
||||
|
||||
def set_lbry_file_manager():
|
||||
self.lbry_file_manager = EncryptedFileManager(
|
||||
self.session, self.stream_info_manager,
|
||||
self.sd_identifier, download_directory=self.download_directory)
|
||||
return self.lbry_file_manager.setup()
|
||||
|
||||
d.addCallback(lambda _: set_lbry_file_manager())
|
||||
return d
|
||||
yield self.stream_info_manager.setup()
|
||||
self.lbry_file_manager = EncryptedFileManager(
|
||||
self.session,
|
||||
self.stream_info_manager,
|
||||
self.sd_identifier,
|
||||
download_directory=self.download_directory
|
||||
)
|
||||
yield self.lbry_file_manager.setup()
|
||||
log.info('Done setting up file manager')
|
||||
|
||||
def _get_analytics(self):
|
||||
if not self.analytics_manager.is_started:
|
||||
|
|
Loading…
Reference in a new issue