Skip to content

Commit a6558a5

Browse files
committed
fix: rename method to reflect request is not initial only
1 parent 19a7e59 commit a6558a5

File tree

1 file changed

+5
-3
lines changed
  • firestore/google/cloud/firestore_v1

1 file changed

+5
-3
lines changed

firestore/google/cloud/firestore_v1/watch.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def __init__(
215215

216216
self.resume_token = None
217217

218-
initial_request = self._get_initial_request
218+
rpc_request = self._get_rpc_request
219219

220220
if ResumableBidiRpc is None:
221221
ResumableBidiRpc = self.ResumableBidiRpc # FBO unit tests
@@ -224,7 +224,7 @@ def __init__(
224224
self._api.transport.listen,
225225
should_recover=_should_recover,
226226
should_terminate=_should_terminate,
227-
initial_request=initial_request,
227+
initial_request=rpc_request,
228228
metadata=self._firestore._rpc_metadata,
229229
)
230230

@@ -258,7 +258,7 @@ def __init__(
258258
self._consumer = BackgroundConsumer(self._rpc, self.on_snapshot)
259259
self._consumer.start()
260260

261-
def _get_initial_request(self):
261+
def _get_rpc_request(self):
262262
if self.resume_token is not None:
263263
self._targets["resume_token"] = self.resume_token
264264
return firestore_pb2.ListenRequest(
@@ -578,6 +578,7 @@ def push(self, read_time, next_resume_token):
578578
self.change_map.clear()
579579
self.resume_token = next_resume_token
580580

581+
581582
@staticmethod
582583
def _extract_changes(doc_map, changes, read_time):
583584
deletes = []
@@ -734,6 +735,7 @@ def _reset_docs(self):
734735
self.change_map.clear()
735736
self.resume_token = None
736737

738+
737739
# Mark each document as deleted. If documents are not deleted
738740
# they will be sent again by the server.
739741
for snapshot in self.doc_tree.keys():

0 commit comments

Comments
 (0)