PreorderBilling

This commit is contained in:
Frank Schubert
2025-03-31 13:50:49 +02:00
parent 21655c5ff4
commit 17405c8c5d
17 changed files with 704 additions and 43 deletions
+6 -6
View File
@@ -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";