Skip to content

Commit

Permalink
Merge pull request #2606 from Drakkar-Software/dev
Browse files Browse the repository at this point in the history
Dev merge
  • Loading branch information
GuillaumeDSM authored Apr 19, 2024
2 parents ce59237 + 1a5b616 commit 5115f7e
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 9 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

*It is strongly advised to perform an update of your tentacles after updating OctoBot. (start.py tentacles --install --all)*

## [1.0.10] - 2024-04-19
### Fixed
- [Tentacles download] Fix a rare issue related to SSL certificates when downloading tentacles
- [DeathAndGoldenCrossEvaluator] Now only trigger right after crosses

## [1.0.9] - 2024-04-18
### Added
- [DigitalOcean] Added in marketplace and handle one click deployment
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# OctoBot [1.0.9](https://octobot.click/gh-changelog)
# OctoBot [1.0.10](https://octobot.click/gh-changelog)
[![PyPI](https://img.shields.io/pypi/v/OctoBot.svg?logo=pypi)](https://octobot.click/gh-pypi)
[![Downloads](https://pepy.tech/badge/octobot/month)](https://pepy.tech/project/octobot)
[![Dockerhub](https://img.shields.io/docker/pulls/drakkarsoftware/octobot.svg?logo=docker)](https://octobot.click/gh-dockerhub)
Expand Down
2 changes: 1 addition & 1 deletion octobot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@

PROJECT_NAME = "OctoBot"
AUTHOR = "Drakkar-Software"
VERSION = "1.0.9" # major.minor.revision
VERSION = "1.0.10" # major.minor.revision
LONG_VERSION = f"{VERSION}"
6 changes: 4 additions & 2 deletions octobot/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
import octobot_commons.logging as logging
import octobot_commons.constants as commons_constants
import octobot_commons.errors as commons_errors
import octobot_commons.aiohttp_util as aiohttp_util

import octobot_tentacles_manager.api as tentacles_manager_api
import octobot_tentacles_manager.cli as tentacles_manager_cli

import octobot
import octobot.api.strategy_optimizer as strategy_optimizer_api
import octobot.logger as octobot_logger
import octobot.constants as constants
Expand Down Expand Up @@ -142,7 +142,9 @@ async def install_or_update_tentacles(config):
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:
async with aiohttp_util.ssl_fallback_aiohttp_client_session(
commons_constants.KNOWN_POTENTIALLY_SSL_FAILED_REQUIRED_URL
) as aiohttp_session:
for url in [tentacles_url] + (
constants.ADDITIONAL_TENTACLES_PACKAGE_URL.split(constants.URL_SEPARATOR)
if constants.ADDITIONAL_TENTACLES_PACKAGE_URL else []
Expand Down
11 changes: 8 additions & 3 deletions octobot/octobot.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import asyncio
import time
import uuid
import aiohttp

import octobot_commons.constants as commons_constants
import octobot_commons.enums as commons_enums
Expand All @@ -27,6 +26,7 @@
import octobot_commons.tree as commons_tree
import octobot_commons.os_clock_sync as os_clock_sync
import octobot_commons.system_resources_watcher as system_resources_watcher
import octobot_commons.aiohttp_util as aiohttp_util

import octobot_services.api as service_api
import octobot_trading.api as trading_api
Expand Down Expand Up @@ -222,6 +222,7 @@ async def stop(self):
self.logger.info("Stopped, now shutting down.")

async def _start_tools_tasks(self):
await self._init_aiohttp_session()
self._init_community()
await self.task_manager.start_tools_tasks()

Expand Down Expand Up @@ -280,7 +281,11 @@ def run_in_main_asyncio_loop(self, coroutine, log_exceptions=True,
def set_watcher(self, watcher):
self.task_manager.watcher = watcher

def get_aiohttp_session(self):
async def _init_aiohttp_session(self):
if self._aiohttp_session is None:
self._aiohttp_session = aiohttp.ClientSession()
self._aiohttp_session = await aiohttp_util.get_ssl_fallback_aiohttp_client_session(
commons_constants.KNOWN_POTENTIALLY_SSL_FAILED_REQUIRED_URL
)

def get_aiohttp_session(self):
return self._aiohttp_session
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Drakkar-Software requirements
OctoBot-Commons==1.9.43
OctoBot-Commons==1.9.44
OctoBot-Trading==2.4.78
OctoBot-Evaluators==1.9.5
OctoBot-Tentacles-Manager==2.9.10
OctoBot-Tentacles-Manager==2.9.11
OctoBot-Services==1.6.13
OctoBot-Backtesting==1.9.7
Async-Channel==2.2.1
Expand Down

0 comments on commit 5115f7e

Please sign in to comment.