···4242}
43434444func (s *KnotStream) SubscribeHost(ctx context.Context, hostname string, noSSL bool) error {
4545- s.logger.Debug("subscribe", "nossl", noSSL)
4545+ l := s.logger.With("hostname", hostname, "nossl", noSSL)
4646+ l.Debug("subscribe")
4647 host, err := db.GetHost(ctx, s.db, hostname)
4748 if err != nil {
4849 return fmt.Errorf("loading host from db: %w", err)
···6061 return fmt.Errorf("adding host to db: %w", err)
6162 }
62636363- s.logger.Info("adding new host subscription", "hostname", hostname, "noSSL", noSSL)
6464+ l.Info("adding new host subscription")
6465 }
65666667 if host.Status == models.HostStatusBanned {
+2-2
knotmirror/readme.md
···6677# TODO
8899-- [ ] cleanup 'resyncing' state on shutdown (or on startup too)
1010-- [ ] better tap reconnecting logic
99+- [x] cleanup 'resyncing' state on shutdown (or on startup too)
1010+- [x] better tap reconnecting logic
1111- [ ] handle really large repos (maybe shallow-clone first?)
12121313idea: run multiple different resync workers. 4 for long running tasks, 10 for short tasks. on timeout, schedule it for long running task