Skip to content

Commit

Permalink
[Version] v1.5.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Herklos committed May 14, 2020
1 parent d7bcb88 commit d8d8d5c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.5.8] - 2020-05-14
### Changed
- [ChannelsManager] Iterates on ChannelConsumerPriorityLevels

## [1.5.7] - 2020-05-12
### Fixed
- Date description parsing
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-Backtesting [1.5.7](https://github.com/Drakkar-Software/OctoBot-Backtesting/blob/master/CHANGELOG.md)
# OctoBot-Backtesting [1.5.8](https://github.com/Drakkar-Software/OctoBot-Backtesting/blob/master/CHANGELOG.md)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/aa0b156e99604b3c98923fffeaea6a49)](https://app.codacy.com/gh/Drakkar-Software/OctoBot-Backtesting?utm_source=github.com&utm_medium=referral&utm_content=Drakkar-Software/OctoBot-Backtesting&utm_campaign=Badge_Grade_Dashboard)
[![PyPI](https://img.shields.io/pypi/v/OctoBot-Backtesting.svg)](https://pypi.python.org/pypi/OctoBot-Backtesting/)
[![Build Status](https://api.travis-ci.com/Drakkar-Software/OctoBot-Backtesting.svg?branch=master)](https://travis-ci.com/Drakkar-Software/OctoBot-Backtesting)
Expand Down
2 changes: 1 addition & 1 deletion octobot_backtesting/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
import logging

PROJECT_NAME = "OctoBot-Backtesting"
VERSION = "1.5.7"
VERSION = "1.5.8"

logging.getLogger('aiosqlite').setLevel(logging.ERROR)
8 changes: 4 additions & 4 deletions octobot_backtesting/channels_manager/channels_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# License along with this library.
import asyncio

from octobot_commons.enums import ChannelConsumerPriorityLevels
from octobot_channels.channels.channel import get_chan
from octobot_commons.channels_name import OctoBotEvaluatorsChannelsName, OctoBotTradingChannelsName, \
OctoBotBacktestingChannelsName
Expand All @@ -23,7 +24,6 @@


class ChannelsManager:
MAX_PRIORITY_LEVEL_TO_REFRESH = 2
DEFAULT_REFRESH_TIMEOUT = 5

def __init__(self, exchange_ids, matrix_id, refresh_timeout=DEFAULT_REFRESH_TIMEOUT):
Expand All @@ -47,11 +47,11 @@ async def initialize(self) -> None:
await producer.start()

async def handle_new_iteration(self) -> None:
for i in range(1, self.MAX_PRIORITY_LEVEL_TO_REFRESH + 1):
for level_key in ChannelConsumerPriorityLevels:
try:
await asyncio.wait_for(self.refresh_priority_level(i), timeout=self.refresh_timeout)
await asyncio.wait_for(self.refresh_priority_level(level_key.value), timeout=self.refresh_timeout)
except asyncio.TimeoutError:
self.logger.error(f"Refreshing priority level {i} has been timed out.")
self.logger.error(f"Refreshing priority level {level_key.value} has been timed out.")

async def refresh_priority_level(self, priority_level: int) -> None:
while not _check_producers_consumers_emptiness(self.producers, priority_level):
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
cython==0.29.17

# Drakkar-Software requirements
OctoBot-Channels>=1.4.1, <1.5
OctoBot-Commons>=1.3.24, <1.4
OctoBot-Channels>=1.4.4, <1.5
OctoBot-Commons>=1.3.30, <1.4
OctoBot-Tentacles-Manager>=2.1.1, <2.2

# Backtesting core requirements
Expand Down

0 comments on commit d8d8d5c

Please sign in to comment.