PreorderBilling
This commit is contained in:
@@ -5,17 +5,15 @@ if (PHP_SAPI !== 'cli') {
|
||||
die("This program can only be run on the command line.\n");
|
||||
}
|
||||
|
||||
require("../../config/config.php");
|
||||
/*
|
||||
fclose(STDIN);
|
||||
fclose(STDOUT);
|
||||
fclose(STDERR);
|
||||
|
||||
$STDIN = fopen('/dev/null', 'r');
|
||||
$STDOUT = fopen('/dev/null', 'w');
|
||||
$STDERR = fopen('/dev/null', 'w');
|
||||
$STDOUT = fopen(BASEDIR.'/var/log/invoice-job-broker.log', 'w');
|
||||
$STDERR = fopen(BASEDIR.'/var/log/invoice-job-broker.err.log', 'w');
|
||||
*/
|
||||
require("../../config/config.php");
|
||||
|
||||
define('mfUI',"cli");
|
||||
define('FRONKDB_SQLDEBUG',false);
|
||||
define("MFBASE_BYPASS_LOGIN", true);
|
||||
@@ -88,7 +86,8 @@ $all_pids = [];
|
||||
|
||||
$valid_tasks = [
|
||||
"make-invoice-pdf",
|
||||
"send-invoice-email"
|
||||
"send-invoice-email",
|
||||
"send-preorder-invoice-email",
|
||||
];
|
||||
|
||||
while(1) {
|
||||
@@ -171,6 +170,7 @@ while(1) {
|
||||
//echo "looking for runner for job $taskname\n";
|
||||
cli_set_process_title($proc["processtitle"]);
|
||||
|
||||
|
||||
$include_name = __DIR__ . "/job-runners/" . $taskname . ".php";
|
||||
if(!file_exists($include_name)) {
|
||||
echo "[$mypid] Runner $include_name not found\n";
|
||||
|
||||
Reference in New Issue
Block a user