|
@@ -11,7 +11,7 @@ use App\Tools\Result;
|
|
|
use Hyperf\Validation\Contract\ValidatorFactoryInterface;
|
|
|
use App\Constants\ErrorCode;
|
|
|
use Hyperf\Context\Context;
|
|
|
-use App\Service\GatherQueueService;
|
|
|
+//use App\Service\GatherQueueService;
|
|
|
use App\Service\ImportQueueService;
|
|
|
/**
|
|
|
* ClassCollectorController
|
|
@@ -22,8 +22,8 @@ class CollectorController extends AbstractController
|
|
|
{
|
|
|
#[Inject]
|
|
|
protected ValidatorFactoryInterface $validationFactory;
|
|
|
- #[Inject]
|
|
|
- protected GatherQueueService $Gservice;
|
|
|
+// #[Inject]
|
|
|
+// protected GatherQueueService $Gservice;
|
|
|
#[Inject]
|
|
|
protected ImportQueueService $Iservice;
|
|
|
|
|
@@ -131,8 +131,9 @@ class CollectorController extends AbstractController
|
|
|
}
|
|
|
// $b = $this->Iservice->push($data,1);
|
|
|
$data['id'] = $requireData['id'];
|
|
|
- $result = $this->Gservice->push($data,3);
|
|
|
- return Result::success($result);
|
|
|
+ var_dump("发送数据:",$data);
|
|
|
+ $result = $this->collectorServiceClient->sendCrawler($data);
|
|
|
+ return $result['code']==200?Result::success($result['data']):Result::error('采集失败');
|
|
|
|
|
|
}
|
|
|
|
|
@@ -141,12 +142,12 @@ class CollectorController extends AbstractController
|
|
|
* @param $data
|
|
|
* @return array
|
|
|
*/
|
|
|
- public function goSendCrawler($data=[])
|
|
|
- {
|
|
|
- var_dump("我要开始采集了!!!");
|
|
|
- $this->collectorServiceClient->sendCrawler($data);
|
|
|
- return Result::success([]);
|
|
|
- }
|
|
|
+// public function goSendCrawler($data=[])
|
|
|
+// {
|
|
|
+// var_dump("我要开始采集了!!!");
|
|
|
+// $this->collectorServiceClient->sendCrawler($data);
|
|
|
+// return Result::success([]);
|
|
|
+// }
|
|
|
|
|
|
|
|
|
}
|