| @@ 54-67 (lines=14) @@ | ||
| 51 | ]; |
|
| 52 | } |
|
| 53 | ||
| 54 | public function actionRequestFetch() |
|
| 55 | { |
|
| 56 | \Yii::$app->response->format = Response::FORMAT_JSON; |
|
| 57 | $response = []; |
|
| 58 | $id = Yii::$app->request->post('id'); |
|
| 59 | if ($id) { |
|
| 60 | try { |
|
| 61 | $response = Crontab::perform('request-fetch', ['id' => $id]); |
|
| 62 | } catch (Exception $e) { |
|
| 63 | $response['error'] = $e->errorInfo['response']; |
|
| 64 | } |
|
| 65 | } |
|
| 66 | return $response; |
|
| 67 | } |
|
| 68 | ||
| 69 | public function actionGetRequestState() |
|
| 70 | { |
|
| @@ 69-82 (lines=14) @@ | ||
| 66 | return $response; |
|
| 67 | } |
|
| 68 | ||
| 69 | public function actionGetRequestState() |
|
| 70 | { |
|
| 71 | Yii::$app->response->format = Response::FORMAT_JSON; |
|
| 72 | $response = []; |
|
| 73 | $id = Yii::$app->request->post('id'); |
|
| 74 | if ($id) { |
|
| 75 | try { |
|
| 76 | $response = Crontab::perform('get-request-state', ['id' => $id]); |
|
| 77 | } catch (Exception $e) { |
|
| 78 | $response['error'] = $e->errorInfo['response']; |
|
| 79 | } |
|
| 80 | } |
|
| 81 | return $response; |
|
| 82 | } |
|
| 83 | ||
| 84 | public function actionGetInfo($id) |
|
| 85 | { |
|