fix: request cleanup jobs

This commit is contained in:
Jon Lundy
2022-12-19 10:50:38 -07:00
parent 7315759b20
commit 250395d6b3
18 changed files with 575 additions and 227 deletions

View File

@@ -45,6 +45,9 @@ func NewEvents(lis ...Event) Events {
for i, e := range lis {
meta := e.EventMeta()
meta.Position = uint64(i)
if meta.ActualPosition == 0 {
meta.ActualPosition = uint64(i)
}
meta.EventID = getULID()
e.SetEventMeta(meta)
}
@@ -224,3 +227,28 @@ func (e *EventPtr) Values() any {
e.Pos,
}
}
type FeedTruncated struct {
eventMeta Meta
}
// EventMeta implements Event
func (e *FeedTruncated) EventMeta() Meta {
if e == nil {
return Meta{}
}
return e.eventMeta
}
// SetEventMeta implements Event
func (e *FeedTruncated) SetEventMeta(m Meta) {
if e == nil {
return
}
e.eventMeta = m
}
func (e *FeedTruncated) Values() any {
return struct {
}{}
}