作者 赵彬吉

update

... ... @@ -177,6 +177,8 @@ class WebTrafficSpecial extends Command
public function handle()
{
try {
$this->sleep();
$page = 1;
while (true){
$project_list = $this->getProjectList($page);
... ... @@ -281,6 +283,13 @@ class WebTrafficSpecial extends Command
}
/**
* 不同项目 休眠
*/
protected function sleep(){
sleep(rand(5,480));
}
/**
* 非俄语站的引流的项目
*/
protected function getProjectList($page){
... ... @@ -307,7 +316,7 @@ class WebTrafficSpecial extends Command
if(Cache::get('traffic_special_' . $project['project_id'])){
continue;
}else{
$ttl = 24 * 60 * 60 / $this->projects[$project['project_id']] + sleep(rand(5,480));
$ttl = 24 * 60 * 60 / $this->projects[$project['project_id']];
Cache::put('traffic_special_' . $project['project_id'], 1, $ttl);
}
... ...