mirror of
https://github.com/livekit/livekit.git
synced 2026-10-23 19:32:41 +00:00
Do not use Redis pipeline for SIP delete. Fixes Redis clustering support. (#3694)
This commit is contained in:
1 parent
1b760393bc
commit
0e17916f15
1 file changed
+13
-6
@@ -106,12 +106,19 @@ func (s *RedisStore) LoadSIPOutboundTrunk(ctx context.Context, id string) (*live
|
||||
}
|
||||
|
||||
func (s *RedisStore) DeleteSIPTrunk(ctx context.Context, id string) error {
|
||||
tx := s.rc.TxPipeline()
|
||||
tx.HDel(s.ctx, SIPTrunkKey, id)
|
||||
tx.HDel(s.ctx, SIPInboundTrunkKey, id)
|
||||
tx.HDel(s.ctx, SIPOutboundTrunkKey, id)
|
||||
_, err := tx.Exec(ctx)
|
||||
return err
|
||||
err1 := s.rc.HDel(s.ctx, SIPTrunkKey, id).Err()
|
||||
err2 := s.rc.HDel(s.ctx, SIPInboundTrunkKey, id).Err()
|
||||
err3 := s.rc.HDel(s.ctx, SIPOutboundTrunkKey, id).Err()
|
||||
if err1 != nil {
|
||||
return err1
|
||||
}
|
||||
if err2 != nil {
|
||||
return err2
|
||||
}
|
||||
if err3 != nil {
|
||||
return err3
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *RedisStore) listSIPLegacyTrunk(ctx context.Context, page *livekit.Pagination) ([]*livekit.SIPTrunkInfo, error) {
|
||||
|
||||
Reference in new issue
Block a user