adiom-data / dsync

Database synchronization tool
https://adiom.io
GNU Affero General Public License v3.0
4 stars 1 forks source link

[fix] Allow graceful shutdown on ctrl C #73

Closed adiom-mark closed 3 days ago

adiom-mark commented 4 days ago

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.