...
|
...
|
@@ -78,10 +78,10 @@ class SendJob { |
|
|
|
|
|
|
|
|
}
|
|
|
}else{
|
|
|
// 休眠30秒
|
|
|
$this->s_sleep(30);
|
|
|
}
|
|
|
// 休眠30秒
|
|
|
$this->s_sleep(30);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
...
|
...
|
@@ -106,7 +106,7 @@ class SendJob { |
|
|
*/
|
|
|
public function go_($list){
|
|
|
// 占用 id
|
|
|
if(redis()->add('send_job_run_id_'.$list['id'],$list['id'],600)){
|
|
|
if(!redis()->add('send_job_run_id_'.$list['id'],$list['id'],600)){
|
|
|
go(function ($data) {
|
|
|
_echo('正在执行任务 '.$data['id']);
|
|
|
$this->cnum++; // 协程数+1
|
...
|
...
|
|