mirror of
				https://github.com/grassrootseconomics/eth-tracker.git
				synced 2025-11-04 10:28:22 +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{
 | 
			
		||||
		Endpoint:        ko.MustString("jetstream.endpoint"),
 | 
			
		||||
		PersistDuration: time.Duration(ko.MustInt("jetstream.persist_duration_hrs")) * time.Hour,
 | 
			
		||||
		DedupDuration:   time.Duration(ko.MustInt("jetstream.dedup_duration_hrs")) * time.Hour,
 | 
			
		||||
		Logg:            lo,
 | 
			
		||||
	})
 | 
			
		||||
	if err != nil {
 | 
			
		||||
 | 
			
		||||
@ -15,7 +15,6 @@ type (
 | 
			
		||||
	JetStreamOpts struct {
 | 
			
		||||
		Logg            *slog.Logger
 | 
			
		||||
		Endpoint        string
 | 
			
		||||
		DedupDuration   time.Duration
 | 
			
		||||
		PersistDuration time.Duration
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@ -53,7 +52,7 @@ func NewJetStreamPub(o JetStreamOpts) (Pub, error) {
 | 
			
		||||
			MaxAge:     o.PersistDuration,
 | 
			
		||||
			Storage:    nats.FileStorage,
 | 
			
		||||
			Subjects:   streamSubjects,
 | 
			
		||||
			Duplicates: o.DedupDuration,
 | 
			
		||||
			Duplicates: time.Minute,
 | 
			
		||||
		})
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return nil, err
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user