...
|
...
|
@@ -57,14 +57,16 @@ public function handle() |
|
|
echo $start_at . ', empty event.' . PHP_EOL;
|
|
|
sleep(30);
|
|
|
} else {
|
|
|
foreach ($events as $val) {
|
|
|
|
|
|
}
|
|
|
$this->expend($events);
|
|
|
}
|
|
|
}
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* @param $data
|
|
|
* @return bool
|
|
|
*/
|
|
|
public function expend($data)
|
|
|
{
|
|
|
foreach ($data as $val) {
|
...
|
...
|
@@ -76,11 +78,21 @@ public function expend($data) |
|
|
case BtEvents::TYPE_DELETE_SITE:
|
|
|
$result = $this->deleteSiteEvent($val->id, $param);
|
|
|
break;
|
|
|
case BtEvents::TYPE_CREATE_SSL:
|
|
|
$result = $this->createSiteSsl($val->id, $param);
|
|
|
break;
|
|
|
case BtEvents::TYPE_RENEWAL_SSL:
|
|
|
$result = $this->renewalSiteSsl($val->id, $param);
|
|
|
break;
|
|
|
case BtEvents::TYPE_EVENT_CALLBACK:
|
|
|
$result = $this->callbackEvent($val->id, $param);
|
|
|
break;
|
|
|
default:
|
|
|
$result = false;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
/**
|
...
|
...
|
@@ -263,6 +275,7 @@ public function callbackEvent($id, $param) |
|
|
$array = [
|
|
|
'status' => $status,
|
|
|
'message' => $message,
|
|
|
'data' => [],
|
|
|
'param' => $param
|
|
|
];
|
|
|
list($code, $result) = app(ToolRepository::class)->curlRequest($callback, $array);
|
...
|
...
|
|