jstaf / onedriver

A native Linux filesystem for Microsoft OneDrive
GNU General Public License v3.0
1.95k stars 96 forks source link

Use near-real-time change notifications for fetching delta #403

Open yousong opened 3 months ago

yousong commented 3 months ago

It seems onedrive graph API provides websocket (socket.io) endpoint for subscribing to "near-real-time change notifications for fetching delta" (Link)

I wrote a simple socket.io go client (Link) and integrated it with the onedriver client. It works. The delay of event notification is about 5-8 seconds.

The other 2 commits is not directly related to the "near-real-time change notification". I can re-organize them into another pull request if needed.

yousong commented 3 months ago

Friendly ping.

I put the binary inside a alpine docker image (Link) and it's been running good for more than 2 weeks.

tduck973564 commented 2 months ago

You need "github.com/jstaf/onedriver/cmd/common" in the imports in cmd/onedriver/xdg.go or else it doesn't build.

yousong commented 1 month ago

You need "github.com/jstaf/onedriver/cmd/common" in the imports in cmd/onedriver/xdg.go or else it doesn't build.

@tduck973564 Indeed. Thank you for the review. I added the line and tested the compilation. It should work now.