1
0
Fork 0
mirror of https://github.com/anyproto/anytype-heart.git synced 2025-06-12 02:30:53 +09:00
This commit is contained in:
mcrakhman 2023-05-26 19:39:38 +02:00
parent 928e85fefb
commit 18f176f20b
No known key found for this signature in database
GPG key ID: DED12CFEF5B8396B
2 changed files with 4 additions and 2 deletions

View file

@ -116,6 +116,7 @@ func (s *Service) NewTreeSyncer(spaceId string) treemanager.TreeSyncer {
// this can happen if it was closed by the space, and we somehow got new instance of space
s.syncer = newTreeSyncer(spaceId, time.Second, 10, s)
if s.syncStarted {
log.Warn("creating tree syncer after run")
s.syncer.Run()
}
return s.syncer

View file

@ -76,6 +76,7 @@ func (t *treeSyncer) Run() {
t.Lock()
defer t.Unlock()
t.isRunning = true
log.Info("starting request pool")
for _, p := range t.requestPools {
p.run()
}
@ -131,9 +132,9 @@ func (t *treeSyncer) requestTree(peerId, id string) {
defer cancel()
_, err := t.treeManager.GetTree(ctx, t.spaceId, id)
if err != nil {
log.Warn(ctx, "can't load missing tree", zap.Error(err))
log.Warn("can't load missing tree", zap.Error(err))
} else {
log.Debug(ctx, "loaded missing tree")
log.Debug("loaded missing tree")
}
}