作者 李宇航

合并分支 'lyh-server' 到 'master'

变更数据



查看合并请求 !3052
... ... @@ -29,6 +29,9 @@ class GeoQuestionRes extends Command
* @var string
*/
protected $signature = 'geo_question_result';
public $porject_id;//记录当时执行的project_id
/**
* The console command description.
*
... ... @@ -37,14 +40,6 @@ class GeoQuestionRes extends Command
protected $description = 'geo设置请求获取结果';
public function demo()
{
// 1 2
// getTaskId -> redis -> [] 1、unlock -> select ; 2:lock sleep
// 1:select, 2:redis -> pop task
// last:mysql status:0, 1:running 2:1->running
}
/**
* @return bool
*/
... ... @@ -56,8 +51,6 @@ class GeoQuestionRes extends Command
sleep(300);
continue;
}
$key = 'geo_question_result_' . date('Y-m-d') . '_' . $task_id;
$ttl = 600;
$this->output('执行的任务ID:' . $task_id);
$geoQuestionModel = new GeoQuestion();
$taskInfo = $geoQuestionModel->read(['id'=>$task_id]);
... ... @@ -87,7 +80,6 @@ class GeoQuestionRes extends Command
$geoResultModel = new GeoQuestionResult();
$geoLogModel = new GeoQuestionLog();
foreach ($taskInfo['question'] as $question) {
$en_question = Translate::tran($question, 'zh') ?? '';
$this->output('项目ID:' . $taskInfo['project_id'] . ', 问题 开始:' . $question);
foreach ($platformsArr as $platform) {
... ...