The RobotMoveAction action server does not allow for overriding trajectories. You can cancel a trajectory, but not sending a new one while there is still one active. So, you have to wait until there is no trajectory being processed to start a new one.
However, you can still achieve what you want to do. You’ll have to write some more code and use the MoveGroup functionality from Moveit. Check out this code here to see how we use the MoveGroupCommander in Python.
So, to do what you want to do:
1. Don’t use the action server we provide (/niryo_one/commander/robot_action)
2. Use the MoveGroupCommander to compute trajectories, and send them to the controller (see this step by step guide)
3. Once planned, the trajectory is sent to ros_control (more specifically a Joint Trajectory Controller). And here, good news, this controller can already replace trajectories (see here for more info on that). So basically, no work needed from you on this part
With that, you can setup your own policy about new trajectories, preemption, etc.