mirror of
https://github.com/anyproto/any-sync.git
synced 2025-06-08 05:57:03 +09:00
Change gc time
This commit is contained in:
parent
a5d2bbe830
commit
d24f229f67
1 changed files with 4 additions and 4 deletions
|
@ -51,8 +51,8 @@ func (p *poolService) Init(a *app.App) (err error) {
|
||||||
return p.dialer.Dial(ctx, id)
|
return p.dialer.Dial(ctx, id)
|
||||||
},
|
},
|
||||||
ocache.WithLogger(log.Sugar()),
|
ocache.WithLogger(log.Sugar()),
|
||||||
ocache.WithGCPeriod(time.Second*5),
|
ocache.WithGCPeriod(time.Minute/2),
|
||||||
ocache.WithTTL(time.Second*10),
|
ocache.WithTTL(time.Minute),
|
||||||
ocache.WithPrometheus(p.metricReg, "netpool", "outgoing"),
|
ocache.WithPrometheus(p.metricReg, "netpool", "outgoing"),
|
||||||
)
|
)
|
||||||
p.pool.incoming = ocache.New(
|
p.pool.incoming = ocache.New(
|
||||||
|
@ -60,8 +60,8 @@ func (p *poolService) Init(a *app.App) (err error) {
|
||||||
return nil, ocache.ErrNotExists
|
return nil, ocache.ErrNotExists
|
||||||
},
|
},
|
||||||
ocache.WithLogger(log.Sugar()),
|
ocache.WithLogger(log.Sugar()),
|
||||||
ocache.WithGCPeriod(time.Second*5),
|
ocache.WithGCPeriod(time.Minute/2),
|
||||||
ocache.WithTTL(time.Second*10),
|
ocache.WithTTL(time.Minute),
|
||||||
ocache.WithPrometheus(p.metricReg, "netpool", "incoming"),
|
ocache.WithPrometheus(p.metricReg, "netpool", "incoming"),
|
||||||
)
|
)
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue