Add XTRIM to Streams AddItem
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
d2fc2ecd3c
commit
c5834cea6e
|
@ -88,6 +88,8 @@ func (timeline *redisStreamTimeline) AddItem(item microsub.Item) (bool, error) {
|
|||
|
||||
_, err = redis.String(conn.Do("XADD", args...))
|
||||
|
||||
_, _ = conn.Do("XTRIM", timeline.channelKey, "MAXLEN", "~", "250")
|
||||
|
||||
return err == nil, err
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user