Exemplo n.º 1
0
async def install_all_tentacles(tentacles_url=None):
    if tentacles_url is None:
        tentacles_url = configuration_manager.get_default_tentacles_url()
    async with aiohttp.ClientSession() as aiohttp_session:
        await tentacles_manager_api.install_all_tentacles(tentacles_url,
                                                          aiohttp_session=aiohttp_session,
                                                          bot_install_dir=os.getcwd())
Exemplo n.º 2
0
def call_tentacles_manager(command_args):
    octobot_logger.init_logger()
    tentacles_urls = [
        configuration_manager.get_default_tentacles_url(),
        # tentacles_manager_api.get_compiled_tentacles_url(
        #     constants.DEFAULT_COMPILED_TENTACLES_URL,
        #     constants.TENTACLES_REQUIRED_VERSION
        # )
    ]
    sys.exit(tentacles_manager_cli.handle_tentacles_manager_command(command_args,
                                                                    tentacles_urls=tentacles_urls,
                                                                    bot_install_dir=os.getcwd()))
Exemplo n.º 3
0
def update_modules(modules):
    success = True
    for url in [
            configuration_manager.get_default_tentacles_url(),
            # tentacles_manager_api.get_compiled_tentacles_url(
            #     octobot_constants.DEFAULT_COMPILED_TENTACLES_URL,
            #     octobot_constants.TENTACLES_REQUIRED_VERSION
            # )
    ]:
        try:
            call_tentacle_manager(tentacles_manager_api.update_tentacles,
                                  modules,
                                  url,
                                  aiohttp_session=interfaces_util.get_bot_api(
                                  ).get_aiohttp_session(),
                                  quite_mode=True)
        except Exception:
            success = False
    if success:
        return f"{len(modules)} Tentacles updated"
    return None
Exemplo n.º 4
0
 async def update_tentacles(self):
     await commands.install_all_tentacles(
         tentacles_url=configuration_manager.get_default_tentacles_url(
             version=await self.get_latest_version()))