Automation init...3

This commit is contained in:
최준흠 2024-09-20 10:35:13 +09:00
parent da88dd6e98
commit 919d6cc78a

View File

@ -224,7 +224,8 @@ abstract class MyCrawler extends CommonController
}
return $storages;
}
private function backend_process(int $cnt, array $listInfo, array $storages): void
private function create_board_process(int $cnt, array $listInfo, array $storages)
{
//Board DB 등록작업등
$formDatas = ['image_path' => "", 'content' => ""];
@ -264,7 +265,12 @@ abstract class MyCrawler extends CommonController
$this->getBoardModel()->getTable(),
count($storages)
));
return $board_entity;
}
private function backend_process(int $cnt, array $listInfo, array $storages): void
{
//Board 등록작업등
$board_entity = $this->create_board_process($cnt, $listInfo, $storages);
//File DB 등록작업, 작은이미지 생성
foreach ($storages as $storage) {
try {
@ -288,15 +294,8 @@ abstract class MyCrawler extends CommonController
$formDatas = [];
$formDatas['image_path'] = "";
$formDatas['content'] = $selector->html();
//File DB 및 Board DB 등록작업등
$this->getBoardModel()->createByCrawler(
$this->getBoardsEntity(),
$this->getUserEntity(),
$cnt,
$listInfo,
[],
$formDatas
);
//Board 등록작업등
$board_entity = $this->create_board_process($cnt, $listInfo, []);
log_message("notice", __FUNCTION__ . " 작업이 완료되었습니다.");
return $listInfo;
}