Skip to content

Commit

Permalink
improve poll settings for layer2
Browse files Browse the repository at this point in the history
  • Loading branch information
mleku committed Dec 4, 2024
1 parent d0a79e4 commit b9dac39
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions layer2/layer2.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ import (
"errors"
"io"
"path/filepath"
"sync"
"time"

"realy.lol/context"
"realy.lol/event"
"realy.lol/eventid"
"realy.lol/filter"
"realy.lol/store"
"realy.lol/tag"
"realy.lol/timestamp"
"sync"
"time"
)

type Backend struct {
Expand All @@ -30,7 +31,7 @@ type Backend struct {
PollFrequency time.Duration
// PollOverlap is the multiple of the PollFrequency within which polling the L2
// is done to ensure any slow synchrony on the L2 is covered (2-4 usually).
PollOverlap timestamp.T
PollOverlap no
// EventSignal triggers when the L1 saves a new event from the L2
//
// caller is responsible for populating this so that a signal can pass to all
Expand Down Expand Up @@ -79,7 +80,7 @@ func (b *Backend) Init(path st) (err er) {
}
// todo now wat
_ = evs
last = until.I64() - b.PollOverlap.I64()*int64(b.PollFrequency/time.Second)
last = until.I64() - int64(time.Duration(b.PollOverlap)*b.PollFrequency/time.Second)
}
}
}()
Expand Down
2 changes: 1 addition & 1 deletion realy/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.2.29
v1.2.30

0 comments on commit b9dac39

Please sign in to comment.