This is a quick fix by
1) Moving the signal handling into app.go, where we actually have access to things like the runner. In main.go we don't have many levers without significant refactoring.
2) Adding a graceful shutdown method to the local runner (not currently reflected in the interface, but we can consider adding it). This method just attempts to shutdown the source, which if it finishes causes a flow to be done.
This is a quick fix by 1) Moving the signal handling into app.go, where we actually have access to things like the runner. In main.go we don't have many levers without significant refactoring.
2) Adding a graceful shutdown method to the local runner (not currently reflected in the interface, but we can consider adding it). This method just attempts to shutdown the source, which if it finishes causes a flow to be done.