mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-08 05:57:03 +09:00
Remove from config
This commit is contained in:
parent
a35d94a20a
commit
959b1307c6
3 changed files with 3 additions and 4 deletions
|
@ -7,6 +7,5 @@ type ConfigGetter interface {
|
|||
type Config struct {
|
||||
GCTTL int `yaml:"gcTTL"`
|
||||
SyncPeriod int `yaml:"syncPeriod"`
|
||||
SyncLogPeriod int `yaml:"syncLogPeriod"`
|
||||
KeepTreeDataInMemory bool `yaml:"keepTreeDataInMemory"`
|
||||
}
|
||||
|
|
|
@ -26,6 +26,8 @@ type DiffSyncer interface {
|
|||
Close() error
|
||||
}
|
||||
|
||||
const logPeriodSecs = 200
|
||||
|
||||
func newDiffSyncer(hs *headSync) DiffSyncer {
|
||||
return &diffSyncer{
|
||||
diff: hs.diff,
|
||||
|
@ -35,7 +37,7 @@ func newDiffSyncer(hs *headSync) DiffSyncer {
|
|||
peerManager: hs.peerManager,
|
||||
clientFactory: spacesyncproto.ClientFactoryFunc(spacesyncproto.NewDRPCSpaceSyncClient),
|
||||
credentialProvider: hs.credentialProvider,
|
||||
log: newSyncLogger(hs.log, hs.syncLogPeriod),
|
||||
log: newSyncLogger(hs.log, logPeriodSecs),
|
||||
syncStatus: hs.syncStatus,
|
||||
deletionState: hs.deletionState,
|
||||
}
|
||||
|
|
|
@ -48,7 +48,6 @@ type headSync struct {
|
|||
spaceId string
|
||||
spaceIsDeleted *atomic.Bool
|
||||
syncPeriod int
|
||||
syncLogPeriod int
|
||||
|
||||
periodicSync periodicsync.PeriodicSync
|
||||
storage spacestorage.SpaceStorage
|
||||
|
@ -75,7 +74,6 @@ func (h *headSync) Init(a *app.App) (err error) {
|
|||
h.spaceId = shared.SpaceId
|
||||
h.spaceIsDeleted = shared.SpaceIsDeleted
|
||||
h.syncPeriod = cfg.GetSpace().SyncPeriod
|
||||
h.syncLogPeriod = cfg.GetSpace().SyncLogPeriod
|
||||
h.configuration = a.MustComponent(nodeconf.CName).(nodeconf.NodeConf)
|
||||
h.log = log.With(zap.String("spaceId", h.spaceId))
|
||||
h.storage = a.MustComponent(spacestorage.CName).(spacestorage.SpaceStorage)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue