| @@ 116-125 (lines=10) @@ | ||
| 113 | * @throws Exception |
|
| 114 | * @throws InvalidResponseBodyException |
|
| 115 | */ |
|
| 116 | public function delete($id) |
|
| 117 | { |
|
| 118 | $response = $this->getHttpClient()->post('/delete', [ |
|
| 119 | 'json' => [ |
|
| 120 | 'id' => $id |
|
| 121 | ] |
|
| 122 | ]); |
|
| 123 | $body = $response->json(); |
|
| 124 | $this->checkResponseBody($body); |
|
| 125 | } |
|
| 126 | ||
| 127 | /** |
|
| 128 | * Job处理完成, 确认删除 |
|
| @@ 135-144 (lines=10) @@ | ||
| 132 | * @throws Exception |
|
| 133 | * @throws InvalidResponseBodyException |
|
| 134 | */ |
|
| 135 | public function finish($id) |
|
| 136 | { |
|
| 137 | $response = $this->getHttpClient()->post('/finish', [ |
|
| 138 | 'json' => [ |
|
| 139 | 'id' => $id, |
|
| 140 | ] |
|
| 141 | ]); |
|
| 142 | $body = $response->json(); |
|
| 143 | $this->checkResponseBody($body); |
|
| 144 | } |
|
| 145 | ||
| 146 | public function validateClassName($className) { |
|
| 147 | if (!class_exists($className)) { |
|