Use the wait for switch Replication Server blocking command to instruct Replication Server to wait until the standby database is ready for operation.
wait for switch for logical_ds.logical_db