How to update compositing nodes via script?
Did you try to activate the composite node like this:

scene = bpy.context.scene
scene.node_tree.nodes.active = scene.node_tree.nodes['Your composite node']
scene.render.use_compositing = True