So I managed to find a work around for this behavior. Referencing
this [
www.sidefx.com] page on TOPs event handling, I put an event handler for when the "commandserverend" TOP completed cooking. This way immediately as that server block finishes, it will call to cook the output node at the bottom.
Here's the example snippet I placed in the OnCreated script on the HDA so the event is registered each time when the node is loaded in:
import pdg
top_node = kwargs['node'].node("./query_SG/commandserverend2")
top_node.cookWorkItems(tops_only=True)
pdg_context = top_node.getPDGGraphContext()
# Define our event handler
def cookRestOfNetwork(event):
kwargs['node'].node("./query_SG/output0").cookWorkItems()
pdg_context.addEventHandler(cookRestOfNetwork, pdg.EventType.CookComplete)
This had a strange behavior in an earlier test where I was using the ui display message example from the TOPs Events page where everything would work as expected, but if I had it also cook that output node it would endlessly pop up the display message....So I just took that ui stuff out because of course its not needed and it didn't endlessly loop.
I don't know exactly what is up with this, but this seems to be working for the time being.
Would love to not have to do this though and just be able to cook the full graph as usual lol