Skip to content

Commit

Permalink
Clean up some outdated Stream docstring variable names #17
Browse files Browse the repository at this point in the history
  • Loading branch information
numberoverzero committed Oct 10, 2016
1 parent 2f76434 commit acd0818
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bloop/stream/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,18 @@ def token(self) -> Dict[str, Any]:
with open(".stream-state", "r") as f:
token = json.load(f)
stream = engine.stream(MyModel, at=token)
stream = engine.stream(MyModel, position=token)
"""
return self.coordinator.token

def heartbeat(self) -> None:
"""Call periodically to ensure iterators without a fixed sequence number don't expire.
You should call this once every ~12 minutes so that your "latest" and "trim_horizon" shard iterators don't
expire. While iterators have an advertised lifetime of 15 minutes, it would be good to call more frequently
so you aren't caught by clock skew expiring an iterator.
expire. While iterators have an advertised lifetime of 15 minutes, calling more frequently can avoid
expiration due to clock skew.
When an iterator with a sequence_number expires, it can be re-created deterministically (although that
When an iterator with a sequence_number expires, it can be recreated deterministically (although that
create may raise ``RecordsExpired`` if the iterator is now beyond the trim horizon). However, "latest" and
"trim_horizon" iterators don't refer to a fixed point in a Shard and so can't be re-created without either:
(1) possibly missing records between "latest" at 15 minutes ago and "latest" now
Expand Down Expand Up @@ -127,7 +127,7 @@ def start_processing(stream, processor)
self.coordinator.heartbeat()

def move_to(self, position) -> None:
"""Updates the StreamIterator to point to the endpoint, time, or token provided.
"""Updates the Stream to point to the endpoint, time, or token provided.
- Moving to ``trim_horizon`` or ``latest`` is very fast.
- Moving to a specific time is slow.
Expand Down

0 comments on commit acd0818

Please sign in to comment.