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

bug: 修改同步时间后没有生效,依然是原来的一个小时git一次 #310

Open
dongrentianyu opened this issue Nov 25, 2022 · 19 comments
Assignees
Labels
bug Something isn't working

Comments

@dongrentianyu
Copy link

dongrentianyu commented Nov 25, 2022

Environment 环境信息

TidGi
TidGi (win32)
Version v0.7.11.

Electron Version: 21.3.0
Node Version: 16.16.0
Chromium Version: 106.0.5249.181

Description 描述

git备份时间修改之后没有变动,还是原来一样,一个小时备份一次。json文件上传不了,我就复制在下面了。这不是单个wiki出了问题,应该是所有的wiki都是一个小时备份一次,应该是全局问题。但也可能只是我一个人有问题。

Steps to Reproduce 复现方式

{"workspaces":{"wtImSRdkAEFzrSSMhoP1f":{"storageService":"local","backupOnInterval":true,"userName":"","gitUrl":null,"isSubWiki":false,"mainWikiToLink":null,"mainWikiID":null,"name":"累了,心累","tagName":null,"port":5212,"wikiFolderLocation":"D:\\太记\\版本\\不想换了\\累了,心累","active":false,"disableAudio":false,"disableNotifications":false,"hibernated":true,"hibernateWhenUnused":false,"homeUrl":"http://0.0.0.0:5212","id":"wtImSRdkAEFzrSSMhoP1f","lastUrl":"http://192.168.2.165:5212/#%E5%AD%90%E7%9F%A5%E8%AF%86","order":4,"picturePath":null,"subWikiFolderName":"subwiki","syncOnInterval":false,"syncOnStartup":true,"transparentBackground":false,"metadata":{}},"0as7-I9oHS4muzJsGCK6P":{"storageService":"local","backupOnInterval":true,"userName":"","gitUrl":null,"isSubWiki":true,"mainWikiToLink":"D:\\太记\\版本\\不想换了\\累了,心累","mainWikiID":"wtImSRdkAEFzrSSMhoP1f","name":"子区1","tagName":"子知识","port":5213,"wikiFolderLocation":"D:\\太记\\版本\\不想换了\\累了,心累\\wiki","active":false,"disableAudio":false,"disableNotifications":false,"hibernated":true,"hibernateWhenUnused":false,"homeUrl":"http://0.0.0.0:5213","id":"0as7-I9oHS4muzJsGCK6P","lastUrl":null,"order":5,"picturePath":null,"subWikiFolderName":"subwiki","syncOnInterval":false,"syncOnStartup":true,"transparentBackground":false,"metadata":{}},"io-oMiWsOx65K1cKlNVac":{"storageService":"local","backupOnInterval":true,"userName":"","gitUrl":null,"isSubWiki":false,"mainWikiToLink":null,"mainWikiID":null,"name":"开启","tagName":null,"port":5214,"wikiFolderLocation":"D:\\太记\\版本\\开始\\开启","active":true,"disableAudio":false,"disableNotifications":false,"hibernated":false,"hibernateWhenUnused":false,"homeUrl":"http://0.0.0.0:5214","id":"io-oMiWsOx65K1cKlNVac","lastUrl":"http://192.168.2.165:5214/#:TableOfContents","order":3,"picturePath":null,"subWikiFolderName":"subwiki","syncOnInterval":false,"syncOnStartup":true,"transparentBackground":false,"metadata":{"isLoading":false,"didFailLoadErrorMessage":null,"badgeCount":0}},"HXeBX5Pxd21jCxo7ijDSr":{"storageService":"local","backupOnInterval":true,"userName":"","gitUrl":null,"isSubWiki":false,"mainWikiToLink":null,"mainWikiID":null,"name":"奇迹","tagName":null,"port":5215,"wikiFolderLocation":"D:\\太记\\教程\\开始\\wiki","active":false,"disableAudio":false,"disableNotifications":false,"hibernated":true,"hibernateWhenUnused":false,"homeUrl":"http://0.0.0.0:5215","id":"HXeBX5Pxd21jCxo7ijDSr","lastUrl":"http://192.168.2.165:5215/#%E2%80%9C%E4%BD%9C%E5%93%81%E2%80%9D%E4%B8%8E%E2%80%9C%E4%BD%9C%E8%80%85%E2%80%9D%E7%9A%84%E5%85%B3%E7%B3%BB:%E2%80%9C%E4%BD%9C%E5%93%81%E2%80%9D%E4%B8%8E%E2%80%9C%E4%BD%9C%E8%80%85%E2%80%9D%E7%9A%84%E5%85%B3%E7%B3%BB%20%24%3A%2FAdvancedSearch%20%E5%8D%A1%E7%89%87%E7%AC%94%E8%AE%B0%E6%98%AF%E8%B6%8B%E5%8A%BF%20word%E9%80%9A%E9%85%8D%E7%AC%A6%E6%9B%BF%E6%8D%A2%20TableOfContents","order":0,"picturePath":null,"subWikiFolderName":"subwiki","syncOnInterval":false,"syncOnStartup":true,"transparentBackground":false,"metadata":{"isLoading":false,"didFailLoadErrorMessage":null,"badgeCount":0}},"s99laxraoWfQpe-pzi47Q":{"storageService":"local","backupOnInterval":true,"userName":"","gitUrl":null,"isSubWiki":false,"mainWikiToLink":null,"mainWikiID":null,"name":"卡片wiki","tagName":null,"port":5217,"wikiFolderLocation":"D:\\太记\\教程\\开始\\卡片包","active":false,"disableAudio":false,"disableNotifications":false,"hibernated":true,"hibernateWhenUnused":false,"homeUrl":"http://0.0.0.0:5217","id":"s99laxraoWfQpe-pzi47Q","lastUrl":"http://192.168.2.165:5217/#%E5%A4%96%E5%9B%BD%E6%96%87%E5%AD%A6%E9%A2%98%E5%BA%93:%E5%A4%96%E5%9B%BD%E6%96%87%E5%AD%A6%E9%A2%98%E5%BA%93","order":2,"picturePath":null,"subWikiFolderName":"subwiki","syncOnInterval":false,"syncOnStartup":true,"transparentBackground":false,"metadata":{}},"wPKWoRZoDYYwVvpd6z3yX":{"storageService":"local","backupOnInterval":true,"userName":"","gitUrl":null,"isSubWiki":false,"mainWikiToLink":null,"mainWikiID":null,"name":"中文拼图阅读wiki","tagName":null,"port":5219,"wikiFolderLocation":"D:\\太记\\版本\\不想换了\\wiki","active":false,"disableAudio":false,"disableNotifications":false,"hibernated":true,"hibernateWhenUnused":false,"homeUrl":"http://0.0.0.0:5219","id":"wPKWoRZoDYYwVvpd6z3yX","lastUrl":"http://192.168.2.165:5219/#%E6%8B%BC%E5%9B%BE%E9%98%85%E8%AF%BB:%E6%8B%BC%E5%9B%BE%E9%98%85%E8%AF%BB%20%E8%A5%BF%E6%96%B9%E6%94%BF%E6%B2%BB%E6%80%9D%E6%83%B3%E5%8F%B2","order":1,"picturePath":null,"subWikiFolderName":"subwiki","syncOnInterval":false,"syncOnStartup":true,"transparentBackground":false,"metadata":{"isLoading":false,"didFailLoadErrorMessage":null,"badgeCount":0}}},"preferences":{"allowPrerelease":true,"alwaysOnTop":false,"askForDownloadPath":true,"attachToMenubar":true,"downloadPath":"D:\\太记\\下载位置","hibernateUnusedWorkspacesAtLaunch":true,"hideMenuBar":false,"ignoreCertificateErrors":false,"language":"zh_CN","menuBarAlwaysOnTop":true,"pauseNotifications":"","pauseNotificationsBySchedule":false,"pauseNotificationsByScheduleFrom":"Fri Jul 15 2022 23:00:09 GMT+0800 (中国标准时间)","pauseNotificationsByScheduleTo":"Fri Jul 15 2022 07:00:09 GMT+0800 (中国标准时间)","pauseNotificationsMuteAudio":false,"rememberLastPageVisited":false,"shareWorkspaceBrowsingData":false,"sidebar":true,"sidebarShortcutHints":true,"spellcheck":true,"spellcheckLanguages":["en-US"],"swipeToNavigate":true,"syncBeforeShutdown":false,"syncOnlyWhenNoDraft":false,"syncDebounceInterval":2105000,"themeSource":"system","titleBar":true,"unreadCountBadge":true,"useHardwareAcceleration":true},"userInfos":{"userName":"马不前","github-branch":"main","github-token":"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","github-userName":"dongrentianyu","github-email":"3465645884@qq.com"}}

Additional Context 额外上下文

D__太记_版本_开始_开启.log

@dongrentianyu dongrentianyu added the bug Something isn't working label Nov 25, 2022
@linonetwo
Copy link
Contributor

同步时间是全局的,就是这里的 "syncDebounceInterval":2105000,

2105000 / 1000 / 3600 = 0.584722222 ,看起来就是0.6 小时一次吧?

@dongrentianyu
Copy link
Author

我测试了一下,我把备份时间改成了五分钟,然后五分钟之后并没有备份,到35分钟的时候就备份了。也就是0.6小时一次。我刚好是在这个时间点上截图了。

备份什么的都开启了。不知道是不是要重启电脑才能恢复。还是说因为开了vpn导致时区不对。我估计还是因为没有重启电脑所以没有生效。但每次更改我都重启了软件的。

image

image

image

image

image

image

image

@dongrentianyu
Copy link
Author

这次我重启电脑了,但五分钟后并没有备份。估计还是35分钟后会备份。如果不是预先设置了最小备份时间的话,那还是出bug了。

image

image

image

@dongrentianyu
Copy link
Author

没有改动,是35分钟备份一次。这个时间也不是不可以接受,但我想更短一点,五分钟。因为有时一边想一边写。五分钟的话还可以找回大部分内容,半个小时的话,可能很多东西就没了。
image

@linonetwo
Copy link
Contributor

哈哈,我检查一下,怎么感觉像是把 5 加到 30 上了

@linonetwo
Copy link
Contributor

你这边的 "syncDebounceInterval":2105000, 不大对,我配了 5分5秒后,应该是 "syncDebounceInterval":305000,

305000 / 1000 / 60 = 5.08333333

@dongrentianyu
Copy link
Author

不知道是我没设置好,还是其他人也有这样的问题,感觉有点奇怪

@linonetwo
Copy link
Contributor

我试了下,我这是正常的。

你要不该你那个配置文件,改为 "syncDebounceInterval":305000, 即可

@linonetwo
Copy link
Contributor

2105000 就是半个多小时

@linonetwo
Copy link
Contributor

挺奇怪的,主要是我这没法复现。难道是Windows才有

@dongrentianyu
Copy link
Author

怎么修改?直接改setting文件吗?

@dongrentianyu
Copy link
Author

有可能,问一下群里大家好了,可能别人没改过这个

@linonetwo
Copy link
Contributor

linonetwo commented Nov 25, 2022

是的,改元信息 setting 文件里的,你在文件里搜到 syncDebounceInterval 改。但这个值应该是会反映到设置界面的那个表单里的呀,不应该setting 里是35分钟,而表单显示5分钟

@dongrentianyu
Copy link
Author

我备份了常用的wiki,也修改好了,再测试一下情况。
离谱起来了。情况见下图。
image
image
image

@dongrentianyu
Copy link
Author

我猜是我开了vpn导致时区不对的原因。上面显示好像是中国标准时间,我现在显示的ip是美国,但美国和中国的时区差也不是这么多啊,不太懂。

@dongrentianyu
Copy link
Author

git同步上了,应该是五分钟后同步的。那就是上面显示的问题了。
image

@dongrentianyu
Copy link
Author

修改之后,其他wiki也是一样,都是五分钟就会git一次。但全局上的显示还是和上面一样。

@Zacharia2
Copy link
Contributor

Zacharia2 commented Nov 25, 2022

在我的电脑上,太记默认30分钟,配置文件数值1800000,更改太记备份时间间隔为5分钟,,查看配置文件数值为300000,查看电脑版本为Win10 64位家庭版太记版本为0.7.11 win32。重启计算机,首先设置VPN为美国,然后打开太记,设置时间为15分钟,查看配置文件数值为900000。打开控制面板查看时区,为UTC+08:00 北京,重庆、香港、乌鲁木齐。没有启用附加时钟,Internet时间为自动定期同步。没有出现问题。

判断 @dongrentianyu 的计算机出问题了。经与他讨论发现他的计算机时间和语言中的日期和时间的时区设置为新加坡时区, @dongrentianyu 推测或许受VPN影响,我感觉VPN应该影响不到Windows的时区。@dongrentianyu 修改时区为UTC+08:00北京时区后太记恢复正常,不过他并不清楚是否是之前设置的新加坡时区。

我担心的是其他国家时区的人使用会不会出现异常情况。所以为了避免时区的问题(或者VPN)的影响,我的想法是:或许让用户直接填写 00:05:00时间间隔,在配置文件中转换成300000数值或许更简单有效,避免意外情况。

@linonetwo
Copy link
Contributor

啊,所以看起来可能是填时间的表单受到了时区影响?我有空排查一下吧

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants