change filemanger setup to inlinecallbacks

This commit is contained in:
jobevers 2017-02-14 10:27:16 -06:00
parent dbb6c6f3a4
commit 520ac9b50a

View file

@ -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: