Skip to content

Commit 5fca3a6

Browse files
committed
Update readme and fix tests.
1 parent 7409f47 commit 5fca3a6

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,10 @@ The /status endpoint provides the current state of the PCSM replication process,
299299
300300
- `lagTimeSeconds`: the current lag time in logical seconds between source and target clusters.
301301
- `eventsApplied`: the number of events applied to the target cluster.
302-
- `lastReplicatedOpTime`: the last replicated operation time.
302+
- `lastReplicatedOpTime`: the last replicated operation time
303+
- `lastReplicatedOpTime.ts`: op time timestamp
304+
- `lastReplicatedOpTime.isoDate`: op time ts in human-readable form
305+
303306
304307
- `initialSync.completed`: indicates if the initial sync is completed.
305308
- `initialSync.lagTimeSeconds`: the lag time in logical seconds until the initial sync completed.
@@ -318,7 +321,10 @@ Example:
318321
319322
"lagTimeSeconds": 22,
320323
"eventsApplied": 5000,
321-
"lastReplicatedOpTime": "1740335200.5",
324+
"lastReplicatedOpTime": {
325+
"ts": "1762241863.1",
326+
"isoDate": "2025-11-04T07:37:43Z"
327+
},
322328
323329
"initialSync": {
324330
"completed": false,

tests/pcsm.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,8 @@ def wait_for_clone_completed(self):
233233
def last_applied_op(self):
234234
"""Get the last applied operation time."""
235235
status = self.pcsm.status()
236-
if last_replicated_op_time := status.get("lastReplicatedOpTime"):
236+
last_replicated_op_time = status.get("lastReplicatedOpTime", {}).get("ts")
237+
if last_replicated_op_time:
237238
t_s, i_s = last_replicated_op_time.split(".")
238239
return bson.Timestamp(int(t_s), int(i_s))
239240

0 commit comments

Comments
 (0)