Set node stack and string properties via rvpush on initial startup

I’m currently running a subprocess to open rv for a specific tag. The problem is that I’d like to open this session with a specific node stack type and add some string properties.

I can create this command like so:

cmd = f"rvpush -tag {tag} merge {path}"
cmd += f"; sleep 7; rvpush -tag {tag} py-eval \"rv.commands.setViewNode('master')\""
cmd += f"; rvpush -tag {tag} py-eval \"[rv.commands.setStringProperty(f'{{stack}}.composite.type', ['replace'], True) for stack in rv.commands.nodesOfType('RVStack')]\""

# Run the cmd here via subprocess
proc = subprocess.Popen(cmd)

and use a custom sleep to wait for RV to start. But this can differ for my users, eg how long it takes for rv to start – so it’s a bit hacky.

Are there any way to open rv with certain settings programmatically like this without relying on a sleep to wait for the rv session to start?