ADB Rimo Import Broker redirects its output to logfile now
This commit is contained in:
@@ -5,16 +5,23 @@ if (PHP_SAPI !== 'cli') {
|
||||
die("This program can only be run on the command line.\n");
|
||||
}
|
||||
|
||||
posix_setrlimit(POSIX_RLIMIT_FSIZE, 1024*1024*1024, 1024*1024*1024); // Limit max filesize to 1 GB
|
||||
|
||||
require("../../config/config.php");
|
||||
|
||||
|
||||
/*
|
||||
* Redirecting output so rlimit for filesize works
|
||||
*/
|
||||
$logfile = BASEDIR.'/var/log/adb-rimo-import-broker.log';
|
||||
echo "Redirecting output to $logfile\n";
|
||||
|
||||
fclose(STDIN);
|
||||
fclose(STDOUT);
|
||||
fclose(STDERR);
|
||||
|
||||
$STDIN = fopen('/dev/null', 'r');
|
||||
$STDOUT = fopen('/dev/null', 'w');
|
||||
$STDERR = fopen('/dev/null', 'w');
|
||||
*/
|
||||
require("../../config/config.php");
|
||||
$STDOUT = fopen($logfile, 'a');
|
||||
$STDERR = fopen($logfile, 'a');
|
||||
|
||||
define('mfUI',"cli");
|
||||
define('FRONKDB_SQLDEBUG',false);
|
||||
@@ -153,7 +160,7 @@ while(1) {
|
||||
|
||||
// delay for 10 minutes before forking new process
|
||||
if($fork_delay) {
|
||||
echo "[parent] fork delay: $fork_delay\n";
|
||||
//echo "[parent] fork delay: $fork_delay\n";
|
||||
$fork_delay--;
|
||||
sleep(1);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user