清理过期的推流鉴权信息
This commit is contained in:
@@ -233,6 +233,8 @@ public interface IRedisCatchStorage {
|
||||
*/
|
||||
StreamAuthorityInfo getStreamAuthorityInfo(String app, String stream);
|
||||
|
||||
List<StreamAuthorityInfo> getAllStreamAuthorityInfo();
|
||||
|
||||
/**
|
||||
* 发送redis消息 查询所有推流设备的状态
|
||||
*/
|
||||
|
||||
@@ -714,6 +714,18 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<StreamAuthorityInfo> getAllStreamAuthorityInfo() {
|
||||
String scanKey = VideoManagerConstants.MEDIA_STREAM_AUTHORITY + userSetting.getServerId() + "_*_*" ;
|
||||
List<StreamAuthorityInfo> result = new ArrayList<>();
|
||||
List<Object> keys = RedisUtil.scan(scanKey);
|
||||
for (Object o : keys) {
|
||||
String key = (String) o;
|
||||
result.add((StreamAuthorityInfo) RedisUtil.get(key));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public OnStreamChangedHookParam getStreamInfo(String app, String streamId, String mediaServerId) {
|
||||
|
||||
Reference in New Issue
Block a user