async def create_producers(self): self.exchange_producer = producers.ExchangeProducer( self.global_consumer.octobot_channel, self, None, self.ignore_config) self.evaluator_producer = producers.EvaluatorProducer( self.global_consumer.octobot_channel, self) self.interface_producer = producers.InterfaceProducer( self.global_consumer.octobot_channel, self) self.service_feed_producer = producers.ServiceFeedProducer( self.global_consumer.octobot_channel, self)
async def create_minimalist_unconnected_octobot(): # import here to prevent later web interface import issues octobot_instance = octobot.OctoBot(test_config.load_test_config(dict_only=False)) octobot_instance.initialized = True tentacles_config = test_utils_config.load_test_tentacles_config() loaders.reload_tentacle_by_tentacle_class() octobot_instance.task_manager.async_loop = asyncio.get_event_loop() octobot_instance.task_manager.create_pool_executor() octobot_instance.tentacles_setup_config = tentacles_config octobot_instance.configuration_manager.add_element(octobot_constants.TENTACLES_SETUP_CONFIG_KEY, tentacles_config) octobot_instance.exchange_producer = trading_producers.ExchangeProducer(None, octobot_instance, None, False) octobot_instance.evaluator_producer = octobot_producers.EvaluatorProducer(None, octobot_instance) octobot_instance.evaluator_producer.matrix_id = await evaluator_api.initialize_evaluators(octobot_instance.config, tentacles_config) return octobot_instance
async def _init_bot(): # import here to prevent web interface import issues import octobot.octobot as octobot import octobot.constants as octobot_constants import octobot.producers as producers import octobot_commons.tests as test_config import octobot_tentacles_manager.loaders as loaders import octobot_evaluators.api as evaluators_api import tests.test_utils.config as config octobot = octobot.OctoBot(test_config.load_test_config(dict_only=False)) octobot.initialized = True tentacles_config = config.load_test_tentacles_config() loaders.reload_tentacle_by_tentacle_class() octobot.task_manager.async_loop = asyncio.get_event_loop() octobot.task_manager.create_pool_executor() octobot.tentacles_setup_config = tentacles_config octobot.configuration_manager.add_element(octobot_constants.TENTACLES_SETUP_CONFIG_KEY, tentacles_config) octobot.exchange_producer = producers.ExchangeProducer(None, octobot, None, False) octobot.evaluator_producer = producers.EvaluatorProducer(None, octobot) octobot.evaluator_producer.matrix_id = await evaluators_api.initialize_evaluators(octobot.config, tentacles_config) # Do not edit config file octobot.community_auth.edited_config = None return octobot