Add XTRIM to Streams AddItem
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Peter Stuifzand 2019-08-17 16:59:46 +02:00
parent d2fc2ecd3c
commit c5834cea6e
Signed by: peter
GPG Key ID: 374322D56E5209E8

View File

@ -88,6 +88,8 @@ func (timeline *redisStreamTimeline) AddItem(item microsub.Item) (bool, error) {
_, err = redis.String(conn.Do("XADD", args...)) _, err = redis.String(conn.Do("XADD", args...))
_, _ = conn.Do("XTRIM", timeline.channelKey, "MAXLEN", "~", "250")
return err == nil, err return err == nil, err
} }