修复通过redis唤醒推流
This commit is contained in:
@@ -16,7 +16,7 @@ import org.springframework.data.redis.listener.RedisMessageListenerContainer;
|
|||||||
* @description:Redis中间件配置类,使用spring-data-redis集成,自动从application.yml中加载redis配置
|
* @description:Redis中间件配置类,使用spring-data-redis集成,自动从application.yml中加载redis配置
|
||||||
* @author: swwheihei
|
* @author: swwheihei
|
||||||
* @date: 2019年5月30日 上午10:58:25
|
* @date: 2019年5月30日 上午10:58:25
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
@Order(value=1)
|
@Order(value=1)
|
||||||
@@ -38,7 +38,6 @@ public class RedisMsgListenConfig {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private RedisCloseStreamMsgListener redisCloseStreamMsgListener;
|
private RedisCloseStreamMsgListener redisCloseStreamMsgListener;
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private RedisRpcConfig redisRpcConfig;
|
private RedisRpcConfig redisRpcConfig;
|
||||||
|
|
||||||
@@ -49,7 +48,7 @@ public class RedisMsgListenConfig {
|
|||||||
/**
|
/**
|
||||||
* redis消息监听器容器 可以添加多个监听不同话题的redis监听器,只需要把消息监听器和相应的消息订阅处理器绑定,该消息监听器
|
* redis消息监听器容器 可以添加多个监听不同话题的redis监听器,只需要把消息监听器和相应的消息订阅处理器绑定,该消息监听器
|
||||||
* 通过反射技术调用消息订阅处理器的相关方法进行一些业务处理
|
* 通过反射技术调用消息订阅处理器的相关方法进行一些业务处理
|
||||||
*
|
*
|
||||||
* @param connectionFactory
|
* @param connectionFactory
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ public class StreamPushPlayServiceImpl implements IStreamPushPlayService {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private UserSetting userSetting;
|
private UserSetting userSetting;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private DynamicTask dynamicTask;
|
private DynamicTask dynamicTask;
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ public class StreamPushPlayServiceImpl implements IStreamPushPlayService {
|
|||||||
StreamPush streamPush = streamPushMapper.queryOne(id);
|
StreamPush streamPush = streamPushMapper.queryOne(id);
|
||||||
Assert.notNull(streamPush, "推流信息未找到");
|
Assert.notNull(streamPush, "推流信息未找到");
|
||||||
|
|
||||||
if (!userSetting.getServerId().equals(streamPush.getServerId())) {
|
if (streamPush.isPushing() && !userSetting.getServerId().equals(streamPush.getServerId())) {
|
||||||
redisRpcPlayService.playPush(id, callback);
|
redisRpcPlayService.playPush(id, callback);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user