Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uploadChanges seems broken #32

Closed
Akendo opened this issue Jan 23, 2016 · 2 comments
Closed

uploadChanges seems broken #32

Akendo opened this issue Jan 23, 2016 · 2 comments

Comments

@Akendo
Copy link

Akendo commented Jan 23, 2016

Hi

I did run in on of my decks following check_media feature to clean up all of my unnecessary elements.

Afterwards I did sync to the anki-sync-server.
But the sync nerver finsihed, the client is keeping uploading to the server without any progress.

In the logs files I can see that he's executing all the time the uploadChanges .

at first I can see how some payload is uploaded, but then I can't see any change.
It seems to me like a loop that is not finished or something.

2016-01-23 11:52:51,309:root:INFO:CollectionThread[/home/akendo/src/anki-sync-server/collections/akendo/collection.anki2]: Running uploadChanges(*[], **{})
2016-01-23 11:52:51,321:root:INFO:CollectionThread[/home/akendo/src/anki-sync-server/collections/akendo/collection.anki2]: Running uploadChanges(*[], **{})
2016-01-23 11:52:51,332:paste.httpserver.ThreadPool:INFO:kill_hung_threads status: 10 threads (0 working, 10 idle, 0 starting) ave time N/A, max time 0.00sec, 
killed 0 workers
2016-01-23 11:52:51,333:root:INFO:CollectionThread[/home/akendo/src/anki-sync-server/collections/akendo/collection.anki2]: Running uploadChanges(*[], **{})

Any idea?

@cdpm
Copy link
Contributor

cdpm commented Jan 24, 2016

SyncMediaHandler.uploadChanges() currently doesn't delete files deleted on the client. If you delete files on the client and then sync, the sync number (usn) returned to the client is not incremented, causing the client to send the same media changes over and over again. I attempted a fix in #34.

@Akendo Akendo closed this as completed Feb 22, 2016
@Akendo
Copy link
Author

Akendo commented Feb 22, 2016

Was fixed by #34

VikashKothary referenced this issue in ankicommunity/ankicommunity-sync-server Mar 23, 2020
From <https://docs.python.org/3.7/library/os.html#os.rename>:
> On Windows, if dst already exists, OSError will be raised even if
> it is a file.
...
> If you want cross-platform overwriting of the destination, use
> replace().

Thanks to kerry liu (https://github.com/hqzxjczx) for reporting this.

Fixes #32.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants