1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-10-26 12:43:50 +03:00

Merge branch 'Eugeny:master' into master

This commit is contained in:
Chen Fansong 2024-04-20 12:25:53 +08:00 committed by GitHub
commit 7114e41fc7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 6 deletions

View File

@ -23,6 +23,8 @@ sudo apt install libfontconfig-dev libsecret-1-dev libarchive-tools libnss3 liba
yarn
```
_⚠Note: If you forked this repository, you may need to pull down the tags from this repository before installing node modules. `git pull --tags upstream master`_
Build Tabby:
```

View File

@ -184,13 +184,17 @@ export class ConfigSyncService {
private async autoSync () {
while (true) {
if (this.isEnabled() && this.config.store.configSync.auto) {
const cfg = await this.getConfig(this.config.store.configSync.configID)
if (new Date(cfg.modified_at) > this.lastRemoteChange) {
this.logger.info('Remote config changed, downloading')
this.download()
this.lastRemoteChange = new Date(cfg.modified_at)
try {
if (this.isEnabled() && this.config.store.configSync.auto) {
const cfg = await this.getConfig(this.config.store.configSync.configID)
if (new Date(cfg.modified_at) > this.lastRemoteChange) {
this.logger.info('Remote config changed, downloading')
this.download()
this.lastRemoteChange = new Date(cfg.modified_at)
}
}
} catch (error) {
this.logger.debug('Recovering from autoSync network error')
}
await new Promise(resolve => setTimeout(resolve, 60000))
}