Merge branch 'fronkdev' into 'master'
ADB Rimo Import Broker redirects its output to logfile now See merge request fronk/thetool!1081
This commit is contained in:
@@ -184,7 +184,13 @@
|
||||
</td>
|
||||
<td><?=((string)$unit) ? "<strong>".(string)$unit."</strong>" : ""?></td>
|
||||
<td><?=($unit->extref) ? "[".$unit->extref."]" : ""?></td>
|
||||
<td title="Anzahl Bestellungen"><?=PreorderModel::countActive(["adb_wohneinheit_id" => $unit->id])?></td>
|
||||
<td title="Anzahl Bestellungen">
|
||||
<?php if(is_array($unit->active_preorders) && count($unit->active_preorders)): ?>
|
||||
<a href="<?=self::getUrl("Preorder", "", [ "filter" => ["adb_wohneinheit_id" => $unit->id]])?>" target="_blank"><?=count($unit->preorders)?></a>
|
||||
<?php else: ?>
|
||||
0
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
@@ -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