Skip to content

Commit

Permalink
Merge pull request #774 from betcode-org/release/2.6.8
Browse files Browse the repository at this point in the history
Bump stream id to 10000 to prevent conflicts on multiple restarts
  • Loading branch information
liampauling authored Nov 1, 2024
2 parents 9c67afa + 5eb2873 commit c886e88
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 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.6.8 (2024-11-01)
+++++++++++++++++++

**Improvements**

- Bump stream id to 10000 to prevent conflicts on multiple restarts

2.6.7 (2024-11-01)
+++++++++++++++++++

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.6.7"
__version__ = "2.6.8"
__author__ = "Liam Pauling"
__license__ = "MIT"
2 changes: 1 addition & 1 deletion flumine/streams/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def stop(self) -> None:
stream.stop()

def _increment_stream_id(self) -> int:
self._stream_id += int(1e3)
self._stream_id += int(1e4)
return self._stream_id

def __iter__(self) -> Iterator[Union[MarketStream, DataStream, HistoricalStream]]:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ def test_stop(self):
mock_stream.stop.assert_called_with()

def test__increment_stream_id(self):
self.assertEqual(self.streams._increment_stream_id(), 1000)
self.assertEqual(self.streams._increment_stream_id(), 10000)

def test_iter(self):
for i in self.streams:
Expand Down

0 comments on commit c886e88

Please sign in to comment.