|
@@ -64,7 +64,7 @@ class SyncProject extends Command |
|
@@ -64,7 +64,7 @@ class SyncProject extends Command |
|
64
|
while (true){
|
64
|
while (true){
|
|
65
|
$list = NoticeLog::where('type', NoticeLog::TYPE_PROJECT)->where('status', NoticeLog::STATUS_PENDING)->get();
|
65
|
$list = NoticeLog::where('type', NoticeLog::TYPE_PROJECT)->where('status', NoticeLog::STATUS_PENDING)->get();
|
|
66
|
foreach ($list as $item){
|
66
|
foreach ($list as $item){
|
|
67
|
- echo 'start:' . $item['id'] . PHP_EOL;
|
67
|
+ echo date('Y-m-d') . ' start:' . $item['id'] . PHP_EOL;
|
|
68
|
try {
|
68
|
try {
|
|
69
|
$is_update = $item['data']['is_update']??0;//是否是4.0或5.0更新到6.0
|
69
|
$is_update = $item['data']['is_update']??0;//是否是4.0或5.0更新到6.0
|
|
70
|
$order_id = $item['data']['order_id'];
|
70
|
$order_id = $item['data']['order_id'];
|
|
@@ -97,7 +97,7 @@ class SyncProject extends Command |
|
@@ -97,7 +97,7 @@ class SyncProject extends Command |
|
97
|
$item->save();
|
97
|
$item->save();
|
|
98
|
echo 'success:' . $item['id'] . PHP_EOL;
|
98
|
echo 'success:' . $item['id'] . PHP_EOL;
|
|
99
|
}catch (\Exception $e){
|
99
|
}catch (\Exception $e){
|
|
100
|
- echo 'error:' . $item['id'] . $e->getMessage() . PHP_EOL;
|
100
|
+ echo 'error:' . $item['id'] . $e->getMessage() .' line ' . $e->getLine() . PHP_EOL;
|
|
101
|
errorLog('项目同步失败', $item, $e);
|
101
|
errorLog('项目同步失败', $item, $e);
|
|
102
|
$this->retry($item, $e->getMessage());
|
102
|
$this->retry($item, $e->getMessage());
|
|
103
|
}
|
103
|
}
|