Skip to content

Commit 6f4040b

Browse files
committed
PYTHON-5270 Server selection should log remainingTimeMS as milliseconds
1 parent 708ce16 commit 6f4040b

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)