Handler fix
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
#!/opt/local/bin/php
|
||||
<?php
|
||||
|
||||
chdir('../..');
|
||||
require_once 'common.php';
|
||||
define('APPDIR', '/www/server/php/');
|
||||
|
||||
require_once APPDIR .'common.php';
|
||||
|
||||
$tmp = array_slice(scandir(Config::get('app:Parser:bot_stats_dir')), 2);
|
||||
$bots = array();
|
||||
@@ -28,14 +29,14 @@ switch ($argv[1]) {
|
||||
echo $bot_name ." is working already\n";
|
||||
} else {
|
||||
echo "Launching ". $bot_name ."\n";
|
||||
shell_exec("./worker_html_grabber.php ". $bot_name ." > /www/parser_data/log/". $bot_name .".log &");
|
||||
shell_exec(APPDIR ."bin/parser/worker_html_grabber.php ". $bot_name ." > /www/parser_data/log/". $bot_name .".log &");
|
||||
}
|
||||
} else {
|
||||
$bots = custom_shuffle($bots);
|
||||
foreach ($bots as $name => $bot) {
|
||||
if (!$bot->active) {
|
||||
echo "Launching ". $name ."\n";
|
||||
shell_exec("./worker_html_grabber.php ". $name ." > /www/parser_data/log/". $name .".log &");
|
||||
shell_exec("bin/parser/worker_html_grabber.php ". $name ." > /www/parser_data/log/". $name .".log &");
|
||||
die;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user