mirror of
https://github.com/grassrootseconomics/eth-tracker.git
synced 2025-02-22 16:00:37 +01:00
fix: remove wide jetstream dedup window. Now reduced to 1 minute.
* closes #39
This commit is contained in:
parent
1c7c53a12f
commit
55159196f4
@ -83,7 +83,6 @@ func main() {
|
|||||||
jetStreamPub, err := pub.NewJetStreamPub(pub.JetStreamOpts{
|
jetStreamPub, err := pub.NewJetStreamPub(pub.JetStreamOpts{
|
||||||
Endpoint: ko.MustString("jetstream.endpoint"),
|
Endpoint: ko.MustString("jetstream.endpoint"),
|
||||||
PersistDuration: time.Duration(ko.MustInt("jetstream.persist_duration_hrs")) * time.Hour,
|
PersistDuration: time.Duration(ko.MustInt("jetstream.persist_duration_hrs")) * time.Hour,
|
||||||
DedupDuration: time.Duration(ko.MustInt("jetstream.dedup_duration_hrs")) * time.Hour,
|
|
||||||
Logg: lo,
|
Logg: lo,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -15,7 +15,6 @@ type (
|
|||||||
JetStreamOpts struct {
|
JetStreamOpts struct {
|
||||||
Logg *slog.Logger
|
Logg *slog.Logger
|
||||||
Endpoint string
|
Endpoint string
|
||||||
DedupDuration time.Duration
|
|
||||||
PersistDuration time.Duration
|
PersistDuration time.Duration
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -53,7 +52,7 @@ func NewJetStreamPub(o JetStreamOpts) (Pub, error) {
|
|||||||
MaxAge: o.PersistDuration,
|
MaxAge: o.PersistDuration,
|
||||||
Storage: nats.FileStorage,
|
Storage: nats.FileStorage,
|
||||||
Subjects: streamSubjects,
|
Subjects: streamSubjects,
|
||||||
Duplicates: o.DedupDuration,
|
Duplicates: time.Minute,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
Reference in New Issue
Block a user