Skip to content

Commit

Permalink
Merge branch 'Eugeny:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
cfs4819 committed Apr 20, 2024
2 parents 5356085 + d15b67a commit 7114e41
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 2 additions & 0 deletions HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

```
Expand Down
16 changes: 10 additions & 6 deletions tabby-settings/src/services/configSync.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down

0 comments on commit 7114e41

Please sign in to comment.