Skip to content

Commit

Permalink
Merge pull request #676 from betcode-org/release/2.4.2
Browse files Browse the repository at this point in the history
Release/2.4.2
  • Loading branch information
liampauling authored Aug 3, 2023
2 parents ff71b2b + 60016c1 commit 796ec51
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
7 changes: 7 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
Release History
---------------

2.4.2 (2023-08-03)
+++++++++++++++++++

**Bug Fixes**

- #674 Update marketCatalogue fix when recording data

2.4.1 (2023-07-25)
+++++++++++++++++++

Expand Down
2 changes: 1 addition & 1 deletion flumine/__version__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__title__ = "flumine"
__description__ = "Betting trading framework"
__url__ = "https://github.com/betcode-org/flumine"
__version__ = "2.4.1"
__version__ = "2.4.2"
__author__ = "Liam Pauling"
__license__ = "MIT"
13 changes: 6 additions & 7 deletions flumine/baseflumine.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,16 +222,15 @@ def _process_raw_data(self, event: events.RawDataEvent) -> None:
market_id = datum["id"]
market = self.markets.markets.get(market_id)
if market is None:
self._add_market(market_id, None)
market = self._add_market(market_id, None)
elif market.closed:
self.markets.add_market(market_id, market)

if (
"marketDefinition" in datum
and datum["marketDefinition"]["status"] == "CLOSED"
):
datum["_stream_id"] = stream_id
self.handler_queue.put(events.CloseMarketEvent(datum))
if "marketDefinition" in datum:
market.update_market_catalogue = True
if datum["marketDefinition"]["status"] == "CLOSED":
datum["_stream_id"] = stream_id
self.handler_queue.put(events.CloseMarketEvent(datum))

for strategy in self.strategies:
if stream_id in strategy.stream_ids:
Expand Down
1 change: 1 addition & 0 deletions tests/test_baseflumine.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ def test__process_raw_data_closed(self, mock__add_market, mock_events):
mock__add_market.assert_called_with("1.23", None)
mock_queue.put.assert_called_with(mock_events.CloseMarketEvent())
self.assertEqual(mock_event.event[3][0]["_stream_id"], mock_event.event[0])
self.assertTrue(mock__add_market.return_value.update_market_catalogue)

@mock.patch("flumine.baseflumine.BaseFlumine._add_market")
def test__process_raw_data_no_id(self, mock__add_market):
Expand Down

0 comments on commit 796ec51

Please sign in to comment.