|
|
@ -54,21 +54,34 @@ if (empty($argv[1])) $argv[1] = 'help'; |
|
|
|
|
|
|
|
|
|
|
|
switch ($argv[1]) { |
|
|
|
switch ($argv[1]) { |
|
|
|
|
|
|
|
|
|
|
|
case 'crawl': |
|
|
|
case 'crontab': |
|
|
|
|
|
|
|
|
|
|
|
CLI::notice(_('crawler queue step begin...')); |
|
|
|
if (empty($argv[2])) { |
|
|
|
|
|
|
|
|
|
|
|
include_once(__DIR__ . '/../crontab/crawler.php'); |
|
|
|
CLI::danger(_('crontab method requires action argument')); |
|
|
|
|
|
|
|
|
|
|
|
CLI::notice(_('crawler queue step begin...')); |
|
|
|
switch ($argv[2]) { |
|
|
|
break; |
|
|
|
|
|
|
|
case 'clean': |
|
|
|
case 'crawl': |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CLI::notice(_('crawler queue step begin...')); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
include_once(__DIR__ . '/../crontab/crawler.php'); |
|
|
|
|
|
|
|
|
|
|
|
CLI::notice(_('cleaner queue step begin...')); |
|
|
|
CLI::notice(_('crawler queue step begin...')); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
include_once(__DIR__ . '/../crontab/cleaner.php'); |
|
|
|
case 'clean': |
|
|
|
|
|
|
|
|
|
|
|
CLI::notice(_('cleaner queue step completed.')); |
|
|
|
CLI::notice(_('cleaner queue step begin...')); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
include_once(__DIR__ . '/../crontab/cleaner.php'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CLI::notice(_('cleaner queue step completed.')); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
break; |
|
|
|
case 'hostPageSnap': |
|
|
|
case 'hostPageSnap': |
|
|
@ -423,8 +436,7 @@ CLI::break(); |
|
|
|
CLI::default('available options:'); |
|
|
|
CLI::default('available options:'); |
|
|
|
|
|
|
|
|
|
|
|
CLI::default(' help - this message'); |
|
|
|
CLI::default(' help - this message'); |
|
|
|
CLI::default(' crawl - execute crawler step in the crontab queue'); |
|
|
|
CLI::default(' crontab [crawl|clean] - execute crontab script queue'); |
|
|
|
CLI::default(' clean - execute cleaner step in the crontab queue'); |
|
|
|
|
|
|
|
CLI::default(' hostPage rank reindex - generate rank indexes in hostPage table'); |
|
|
|
CLI::default(' hostPage rank reindex - generate rank indexes in hostPage table'); |
|
|
|
CLI::default(' hostPageSnap repair - sync DB/FS relations'); |
|
|
|
CLI::default(' hostPageSnap repair - sync DB/FS relations'); |
|
|
|
CLI::default(' hostPageDom generate [selectors] - make hostPageDom index based on related hostPage.data field'); |
|
|
|
CLI::default(' hostPageDom generate [selectors] - make hostPageDom index based on related hostPage.data field'); |
|
|
|