|
@@ -21,7 +21,7 @@ class TopicUseCount extends Command
|
|
|
*
|
|
|
* @var string
|
|
|
*/
|
|
|
- protected $description = '更新话题使用数';
|
|
|
+ protected $description = '添加话题使用数';
|
|
|
|
|
|
/**
|
|
|
* Create a new command instance.
|
|
@@ -41,7 +41,7 @@ class TopicUseCount extends Command
|
|
|
*/
|
|
|
public function handle()
|
|
|
{
|
|
|
- $this->line("开始更新话题使用数");
|
|
|
+ $this->line("开始添加话题使用数");
|
|
|
|
|
|
$key = 'topic.just_use_count';
|
|
|
$ids = Redis::ZRANGE($key, 0 , -1, 'WITHSCORES');
|
|
@@ -50,9 +50,9 @@ class TopicUseCount extends Command
|
|
|
$value = Redis::ZSCORE($key, $topicId);
|
|
|
Redis::ZREM ($key, $topicId);
|
|
|
$this->topic->where('id', $topicId)->increment('use_count', $value);
|
|
|
- Log::debug('更新更新话题使用数成功'.$topicId.'-'.$value);
|
|
|
+ Log::debug('添加话题使用数成功'.$topicId.'-'.$value);
|
|
|
}catch (\Exception $exception){
|
|
|
- Log::error('更新更新话题使用数失败'.$topicId.'-'.$val.$exception->getMessage());
|
|
|
+ Log::error('添加话题使用数失败'.$topicId.'-'.$val.$exception->getMessage());
|
|
|
}
|
|
|
usleep(10000);
|
|
|
}
|