...
|
...
|
@@ -145,6 +145,18 @@ class Video extends \yii\db\ActiveRecord |
|
|
$result = Yii::$app->db->createCommand()
|
|
|
->update('{{%room}}', ['living' => 1,'update_time'=>time()], ['room_id' => $room_id])
|
|
|
->execute();
|
|
|
$cache_prefix = Yii::$app->params['cache_prefix'];
|
|
|
/*------------清除弹幕相关redis--------------*/
|
|
|
//##主播app 向弹幕服务器发送开始命令时也清除,这里也清除是为了防止弹幕服务器连不上没有清掉
|
|
|
//清掉在线马甲数
|
|
|
Yii::$app->redis->del(sprintf($cache_prefix . ":vestnum_%s", $room_id));
|
|
|
//清在线观看数
|
|
|
Yii::$app->redis->del(sprintf($cache_prefix . ":audience_nums_room_%s", $room_id));
|
|
|
//清点赞数
|
|
|
Yii::$app->redis->del(sprintf($cache_prefix . ":like_numbers_room_%s", $room_id));
|
|
|
//清直播状态
|
|
|
Yii::$app->redis->del(sprintf($cache_prefix . ":play_stat_room_%s", $room_id));
|
|
|
/*------------清除弹幕相关redis--------------*/
|
|
|
if (!$result) {
|
|
|
throw new \Exception('tbl_room update error');
|
|
|
}
|
...
|
...
|
|