|
@@ -57,14 +57,16 @@ public function handle() |
|
@@ -57,14 +57,16 @@ public function handle() |
57
|
echo $start_at . ', empty event.' . PHP_EOL;
|
57
|
echo $start_at . ', empty event.' . PHP_EOL;
|
58
|
sleep(30);
|
58
|
sleep(30);
|
59
|
} else {
|
59
|
} else {
|
60
|
- foreach ($events as $val) {
|
|
|
61
|
-
|
|
|
62
|
- }
|
60
|
+ $this->expend($events);
|
63
|
}
|
61
|
}
|
64
|
}
|
62
|
}
|
65
|
return true;
|
63
|
return true;
|
66
|
}
|
64
|
}
|
67
|
|
65
|
|
|
|
66
|
+ /**
|
|
|
67
|
+ * @param $data
|
|
|
68
|
+ * @return bool
|
|
|
69
|
+ */
|
68
|
public function expend($data)
|
70
|
public function expend($data)
|
69
|
{
|
71
|
{
|
70
|
foreach ($data as $val) {
|
72
|
foreach ($data as $val) {
|
|
@@ -76,11 +78,21 @@ public function expend($data) |
|
@@ -76,11 +78,21 @@ public function expend($data) |
76
|
case BtEvents::TYPE_DELETE_SITE:
|
78
|
case BtEvents::TYPE_DELETE_SITE:
|
77
|
$result = $this->deleteSiteEvent($val->id, $param);
|
79
|
$result = $this->deleteSiteEvent($val->id, $param);
|
78
|
break;
|
80
|
break;
|
|
|
81
|
+ case BtEvents::TYPE_CREATE_SSL:
|
|
|
82
|
+ $result = $this->createSiteSsl($val->id, $param);
|
|
|
83
|
+ break;
|
|
|
84
|
+ case BtEvents::TYPE_RENEWAL_SSL:
|
|
|
85
|
+ $result = $this->renewalSiteSsl($val->id, $param);
|
|
|
86
|
+ break;
|
|
|
87
|
+ case BtEvents::TYPE_EVENT_CALLBACK:
|
|
|
88
|
+ $result = $this->callbackEvent($val->id, $param);
|
|
|
89
|
+ break;
|
79
|
default:
|
90
|
default:
|
80
|
$result = false;
|
91
|
$result = false;
|
81
|
break;
|
92
|
break;
|
82
|
}
|
93
|
}
|
83
|
}
|
94
|
}
|
|
|
95
|
+ return true;
|
84
|
}
|
96
|
}
|
85
|
|
97
|
|
86
|
/**
|
98
|
/**
|
|
@@ -263,6 +275,7 @@ public function callbackEvent($id, $param) |
|
@@ -263,6 +275,7 @@ public function callbackEvent($id, $param) |
263
|
$array = [
|
275
|
$array = [
|
264
|
'status' => $status,
|
276
|
'status' => $status,
|
265
|
'message' => $message,
|
277
|
'message' => $message,
|
|
|
278
|
+ 'data' => [],
|
266
|
'param' => $param
|
279
|
'param' => $param
|
267
|
];
|
280
|
];
|
268
|
list($code, $result) = app(ToolRepository::class)->curlRequest($callback, $array);
|
281
|
list($code, $result) = app(ToolRepository::class)->curlRequest($callback, $array);
|