End the replication background task in the expiration handler block.