Skip to content

Commit 4d4a26c

Browse files
authored
PYTHON-5270 Server selection should log remainingTimeMS as milliseconds (#2263)
1 parent 7a4218f commit 4d4a26c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pymongo/asynchronous/topology.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ async def _select_servers_loop(
354354
operationId=operation_id,
355355
topologyDescription=self.description,
356356
clientId=self.description._topology_settings._topology_id,
357-
remainingTimeMS=int(end_time - time.monotonic()),
357+
remainingTimeMS=int(1000 * (end_time - time.monotonic())),
358358
)
359359
logged_waiting = True
360360

pymongo/synchronous/topology.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ def _select_servers_loop(
354354
operationId=operation_id,
355355
topologyDescription=self.description,
356356
clientId=self.description._topology_settings._topology_id,
357-
remainingTimeMS=int(end_time - time.monotonic()),
357+
remainingTimeMS=int(1000 * (end_time - time.monotonic())),
358358
)
359359
logged_waiting = True
360360

0 commit comments

Comments
 (0)