EugenMayer / docker-sync

Run your application at full speed while syncing your code for development, finally empowering you to utilize docker for development under OSX/Windows/*Linux
GNU General Public License v3.0
3.52k stars 288 forks source link

Notifications not triggered after first sync in unison #105

Closed EugenMayer closed 7 years ago

EugenMayer commented 7 years ago

After the first sync, i never get a sync-notification ever anymore

mickaelperrin commented 7 years ago

Mmm, didn't get the point that the sync notification should be spawned for each sync even after the first sync. Initial sync can be slow, and the notification helper is a good addition to do something else waiting that the first sync finishes, but I don't get the use case for later notifications.

That said, I didn't find any hook in unison to launch an external program after a sync.

The only way I see to do this is to capture the external output and search for a particular string, buffer the triggers to prevent notification spam and then emit the notification. Not sure, I will try to implement this.

EugenMayer commented 7 years ago

well either way, since this differs from the rsync implementation, we should at least document it. Rsync gives you a notification on each sync, each sync is registered, since fswatch triggers docker-sync sync as a cli command - which then triggers a rsync command, and during that ruby code, the terminal notifier gets used

I guess unison + unox do work together internally, right. After setting it up as a daemon once, you do not need to trigger anything else, no pass the configuration at each "sync" event, like rsync needs, right?

If there is no integration point like this, we can argue to either remove the terminal notification or, when its enabled, show a notification that this is not really supported for unison. That probably makes more sense then just creating documentation

EugenMayer commented 7 years ago

added docs in the example and the wiki