@@ 67-80 (lines=14) @@ | ||
64 | ]); |
|
65 | } |
|
66 | ||
67 | public function actionRequestFetch() |
|
68 | { |
|
69 | \Yii::$app->response->format = Response::FORMAT_JSON; |
|
70 | $response = []; |
|
71 | $id = Yii::$app->request->post('id'); |
|
72 | if ($id) { |
|
73 | try { |
|
74 | $response = Crontab::perform('request-fetch', ['id' => $id]); |
|
75 | } catch (Exception $e) { |
|
76 | $response['error'] = $e->errorInfo['response']; |
|
77 | } |
|
78 | } |
|
79 | ||
80 | return $response; |
|
81 | } |
|
82 | ||
83 | public function actionGetRequestState() |
|
@@ 83-96 (lines=14) @@ | ||
80 | return $response; |
|
81 | } |
|
82 | ||
83 | public function actionGetRequestState() |
|
84 | { |
|
85 | Yii::$app->response->format = Response::FORMAT_JSON; |
|
86 | $response = []; |
|
87 | $id = Yii::$app->request->post('id'); |
|
88 | if ($id) { |
|
89 | try { |
|
90 | $response = Crontab::perform('get-request-state', ['id' => $id]); |
|
91 | } catch (Exception $e) { |
|
92 | $response['error'] = $e->errorInfo['response']; |
|
93 | } |
|
94 | } |
|
95 | ||
96 | return $response; |
|
97 | } |
|
98 | ||
99 | public function actionGetInfo($id) |