Event for pushing file

Hi! I have question about event iterface…

When file is changed on remote node and pulled to local one, there is ItemStarted followed by ItemUpdated event emited for that file & repo. Is there any combination of events, that is emited when changed file is uploaded to remote node?

No. The events that are available are those described in the event documentation.

And is there any plan to including event for sending?

Not currently. What’s the use case?

Files aren’t really uploaded, asu such; individual blocks are uploaded, from one or more devices. We don’t want to generate an event for each block (too many events). A small cache could be used to remember blocks for files+devices we’ve recently generated events for and skip those, during a given time interval etc. All in all it’s a bit of work, so there would need to be a clear need for it.

I’m trying to implement desktop notifications in that little gtk ui project of mine and while I can do notification for “File XYZ was updated to latest version”, I can’t do “File XYZ was successfully sent (backed up) to remote node”.

It isn’t anything crucial, I just though it may be nice feature.

I see. In that case you really want to trigger on index updates from the remote instead; we can’t know that it’s successfully synchronized on the other side just based on the blocks we send. Unfortunately syncthing doesn’t generate events for the individual files changed in the remote index, just that it was updated in general…

I understand… Is there any chance that RemoteIndexUpdated will be emitted only if remote node finished downloading all files? If not, only way how to detect successful file upload would be watching if any remote node reaches 100% sync state with repo where file belongs…