mirror of
https://github.com/anyproto/anytype-heart.git
synced 2025-06-12 02:30:53 +09:00
Add logs
This commit is contained in:
parent
928e85fefb
commit
18f176f20b
2 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue