|
@ -418,9 +418,17 @@ class Topics extends RedisModel {
|
|
|
let self = this;
|
|
|
let topic_key = RedisModel.makeRedisKey(REDIS_KEYS.Topic, topicId);
|
|
|
redis.hmsetAsync(topic_key, "end_time", endDate.getTime(), "end_by", endUser, "status", TOPIC_STATUS.ENDED).then(function (res) {
|
|
|
redis.hgetallAsync(topic_key).then(function (topic) {
|
|
|
callEnd(topic.session_id);
|
|
|
})
|
|
|
// redis.hgetallAsync(topic_key).then(function (topic) {
|
|
|
// callEnd(topic.session_id);
|
|
|
// })
|
|
|
// redis 出错的时候 根据topic_key无法取出正确的sessionId,改成从数据库取
|
|
|
TopicsRepo.findOne(topicId,function (err, res){
|
|
|
if(err){
|
|
|
ModelUtil.emitOK(self.eventEmitter, {status: -1, "message": err});
|
|
|
}else {
|
|
|
callEnd(res[0].session_id);
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
|
|
|
/**
|