|
...
|
...
|
@@ -40,14 +40,15 @@ class HtmlSpecialCollect extends Command |
|
|
|
public function handle()
|
|
|
|
{
|
|
|
|
ini_set('memory_limit', '512M');
|
|
|
|
while (true) {
|
|
|
|
// while (true) {
|
|
|
|
$this->start_collect();
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
|
|
|
|
protected function start_collect()
|
|
|
|
{
|
|
|
|
$task_id = $this->get_task();
|
|
|
|
// $task_id = $this->get_task();
|
|
|
|
$task_id = '626_1';
|
|
|
|
if ($task_id === false) {
|
|
|
|
//所有项目采集完成
|
|
|
|
sleep(60);
|
|
...
|
...
|
@@ -267,9 +268,9 @@ class HtmlSpecialCollect extends Command |
|
|
|
&& (strpos($path_end, 'com') === false)
|
|
|
|
&& (strpos($path_end, 'xml') === false)
|
|
|
|
) {
|
|
|
|
$new_url = str_replace($home_url, $web_url_domain, $url);
|
|
|
|
$source = CollectSource::where('project_id', $project_id)->where('origin', $new_url)->first();
|
|
|
|
$source = CollectSource::where('project_id', $project_id)->where('origin', $url)->first();
|
|
|
|
if (!$source) {
|
|
|
|
echo $url . PHP_EOL;
|
|
|
|
return [
|
|
|
|
'download' => true,
|
|
|
|
'url' => $url,
|
...
|
...
|
|