You are sending:
msg.headers['Node-RED-Deployment-Type'] = "reload";
Documentation describes:
The Node-RED-Deployment-Type header is used to define what type of deployment is performed.
full - all existing nodes are stopped before the new configuration is started. This is the default behaviour if the header is not provided.
nodes - only nodes that have been modified are stopped before the new configuration is applied.
flows - only flows that contain modified nodes are stopped before the new configuration is applied.
reload - the flows are reloaded from storage and all nodes are restarted (since Node-RED 0.12.2)