|
@@ -88,9 +88,11 @@ class SyncSubmitTaskService |
|
@@ -88,9 +88,11 @@ class SyncSubmitTaskService |
|
88
|
}
|
88
|
}
|
|
89
|
}
|
89
|
}
|
|
90
|
|
90
|
|
|
|
|
91
|
+ $time = time();
|
|
91
|
if(!ProjectServer::useProject($project['id'])){
|
92
|
if(!ProjectServer::useProject($project['id'])){
|
|
92
|
return false;
|
93
|
return false;
|
|
93
|
}
|
94
|
}
|
|
|
|
95
|
+ echo date('Y-m-d H:i:s') . ' | useProject time:' . (time() - $time) . PHP_EOL;
|
|
94
|
|
96
|
|
|
95
|
$action = $task['type'];
|
97
|
$action = $task['type'];
|
|
96
|
|
98
|
|
|
@@ -106,7 +108,7 @@ class SyncSubmitTaskService |
|
@@ -106,7 +108,7 @@ class SyncSubmitTaskService |
|
106
|
}
|
108
|
}
|
|
107
|
$filed == 'email' && $action = 'subscribe';
|
109
|
$filed == 'email' && $action = 'subscribe';
|
|
108
|
}
|
110
|
}
|
|
109
|
-
|
111
|
+
|
|
110
|
$handler = new self();
|
112
|
$handler = new self();
|
|
111
|
return $handler->$action($data, $date, $task['id'], $task['traffic']);
|
113
|
return $handler->$action($data, $date, $task['id'], $task['traffic']);
|
|
112
|
}
|
114
|
}
|
|
@@ -297,6 +299,7 @@ class SyncSubmitTaskService |
|
@@ -297,6 +299,7 @@ class SyncSubmitTaskService |
|
297
|
if(!$ip){
|
299
|
if(!$ip){
|
|
298
|
return '';
|
300
|
return '';
|
|
299
|
}
|
301
|
}
|
|
|
|
302
|
+
|
|
300
|
$res = Http::withoutVerifying()->get('http://ip.globalso.com', ['ip' => $ip]);
|
303
|
$res = Http::withoutVerifying()->get('http://ip.globalso.com', ['ip' => $ip]);
|
|
301
|
if($res->status() == 200){
|
304
|
if($res->status() == 200){
|
|
302
|
return $res->body();
|
305
|
return $res->body();
|
|
@@ -334,7 +337,9 @@ class SyncSubmitTaskService |
|
@@ -334,7 +337,9 @@ class SyncSubmitTaskService |
|
334
|
if($ip == "127.0.0.1"){
|
337
|
if($ip == "127.0.0.1"){
|
|
335
|
throw new InquiryFilterException('127.0.0.1过滤');
|
338
|
throw new InquiryFilterException('127.0.0.1过滤');
|
|
336
|
}
|
339
|
}
|
|
|
|
340
|
+ $time = time();
|
|
337
|
$country = self::getCountryByIp($ip);
|
341
|
$country = self::getCountryByIp($ip);
|
|
|
|
342
|
+ echo date('Y-m-d H:i:s') . ' | getCountryByIp time:' . (time() - $time) . PHP_EOL;
|
|
338
|
//访问记录过滤国内
|
343
|
//访问记录过滤国内
|
|
339
|
if ($type == SyncSubmitTask::TYPE_VISIT && $country == "中国" && !$project->is_record_china_visit){
|
344
|
if ($type == SyncSubmitTask::TYPE_VISIT && $country == "中国" && !$project->is_record_china_visit){
|
|
340
|
throw new InquiryFilterException('中国内地过滤');
|
345
|
throw new InquiryFilterException('中国内地过滤');
|