mirror of
https://github.com/ankitects/anki.git
synced 2025-11-10 22:57:11 -05:00
factor time diff into lastSync
This commit is contained in:
parent
bd3d964b71
commit
3b7c6f4875
1 changed files with 2 additions and 3 deletions
|
|
@ -100,8 +100,7 @@ sync was aborted. Please report this error.""")
|
||||||
proxy.connect("ankiqt-" + ankiqt.appVersion)
|
proxy.connect("ankiqt-" + ankiqt.appVersion)
|
||||||
self.proxy = proxy
|
self.proxy = proxy
|
||||||
# check clock
|
# check clock
|
||||||
timediff = abs(proxy.timestamp - time.time())
|
if proxy.timediff > 300:
|
||||||
if timediff > 300:
|
|
||||||
self.emit(SIGNAL("syncClockOff"), timediff)
|
self.emit(SIGNAL("syncClockOff"), timediff)
|
||||||
raise SyncError(type="clockOff")
|
raise SyncError(type="clockOff")
|
||||||
return self.proxy
|
return self.proxy
|
||||||
|
|
@ -192,7 +191,7 @@ sync was aborted. Please report this error.""")
|
||||||
client.setServer(proxy)
|
client.setServer(proxy)
|
||||||
# need to do anything?
|
# need to do anything?
|
||||||
start = time.time()
|
start = time.time()
|
||||||
if client.prepareSync():
|
if client.prepareSync(proxy.timediff):
|
||||||
changes = True
|
changes = True
|
||||||
# summary
|
# summary
|
||||||
if not self.conflictResolution and not self.onlyMerge:
|
if not self.conflictResolution and not self.onlyMerge:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue