| 
...
 | 
...
 | 
@@ -193,7 +193,7 @@ class SyncToEsCmd { | 
| 
 | 
 | 
     public function setEsMap($index){
 | 
| 
 | 
 | 
         $this->es->setIndex($index);
 | 
| 
 | 
 | 
         if($this->es->getMapping()){
 | 
| 
 | 
 | 
            return true;
 | 
| 
 | 
 | 
            return 9;
 | 
| 
 | 
 | 
         }
 | 
| 
 | 
 | 
 
 | 
| 
 | 
 | 
         if(redis()->add('setmaplock:'.$index,1,20)){
 | 
| 
...
 | 
...
 | 
@@ -265,12 +265,15 @@ class SyncToEsCmd { | 
| 
 | 
 | 
         $this->es->setIndex($index);
 | 
| 
 | 
 | 
         // 检查数据库是否存在
 | 
| 
 | 
 | 
         if(empty($this->checkEsIndex[$index]) && $index != 'email_lists_copy'){
 | 
| 
 | 
 | 
             if(!redis()->has('esmapcheck:'.$index)){
 | 
| 
 | 
 | 
                 $m = $this->setEsMap($index);
 | 
| 
 | 
 | 
             _echo("{$index} 创建索引 ".$m);
 | 
| 
 | 
 | 
                 if($m !== 9) _echo("{$index} 创建索引 ".$m);
 | 
| 
 | 
 | 
                 if(!$m){
 | 
| 
 | 
 | 
                     $this->log($data_id,$index);
 | 
| 
 | 
 | 
                     return;
 | 
| 
 | 
 | 
                 }
 | 
| 
 | 
 | 
                 redis()->set('esmapcheck:'.$index,1,86400);
 | 
| 
 | 
 | 
             }
 | 
| 
 | 
 | 
         }
 | 
| 
 | 
 | 
         // 下次不在检查
 | 
| 
 | 
 | 
         $this->checkEsIndex[$index] = 1;
 | 
...
 | 
...
 | 
 |