作者 lyh

gx

@@ -51,7 +51,7 @@ class InitProject extends Command @@ -51,7 +51,7 @@ class InitProject extends Command
51 $list = NoticeLog::where('type', NoticeLog::TYPE_INIT_PROJECT)->where('status', NoticeLog::STATUS_PENDING)->get(); 51 $list = NoticeLog::where('type', NoticeLog::TYPE_INIT_PROJECT)->where('status', NoticeLog::STATUS_PENDING)->get();
52 foreach ($list as $item){ 52 foreach ($list as $item){
53 echo 'start:' . $item['id'] . PHP_EOL; 53 echo 'start:' . $item['id'] . PHP_EOL;
54 - try { 54 +// try {
55 $project = Project::find($item['data']['project_id']); 55 $project = Project::find($item['data']['project_id']);
56 $project_logic = new ProjectLogic(); 56 $project_logic = new ProjectLogic();
57 //初始化数据库 57 //初始化数据库
@@ -70,11 +70,11 @@ class InitProject extends Command @@ -70,11 +70,11 @@ class InitProject extends Command
70 $item->status = NoticeLog::STATUS_SUCCESS; 70 $item->status = NoticeLog::STATUS_SUCCESS;
71 $item->save(); 71 $item->save();
72 echo 'success:' . $item['id'] . PHP_EOL; 72 echo 'success:' . $item['id'] . PHP_EOL;
73 - }catch (\Exception $e){  
74 - echo 'error:' . $item['id'] . $e->getMessage() . PHP_EOL;  
75 - errorLog('项目初始化失败', $item, $e);  
76 - $this->retry($item, $e->getMessage());  
77 - } 73 +// }catch (\Exception $e){
  74 +// echo 'error:' . $item['id'] . $e->getMessage() . PHP_EOL;
  75 +// errorLog('项目初始化失败', $item, $e);
  76 +// $this->retry($item, $e->getMessage());
  77 +// }
78 } 78 }
79 sleep(2); 79 sleep(2);
80 } 80 }