Skip to content

Correctly set since on one off follower #734

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ibmcloudant/features/changes_follower.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ def __init__(
self._limit = None
self._stop = Event()
self.logger = logging.getLogger(__name__)
self._request_thread.start()

@property
def limit(self) -> int:
Expand All @@ -127,6 +126,9 @@ def since(self) -> str:
def since(self, value: str) -> None:
self._since = value

def _start(self) -> None:
self._request_thread.start()

def stop(self) -> None:
# shortcut limit and cancel in-flight
self.limit = 0
Expand Down Expand Up @@ -454,4 +456,5 @@ def _run(self, mode: _Mode):
self._iter.limit = self.limit
if self.options.get('since') is not None:
self._iter.since = self.options.get('since')
self._iter._start()
return self._iter