Initial import

This commit is contained in:
2026-06-04 11:13:34 +01:00
commit 563d9cc96d
143 changed files with 10572 additions and 0 deletions
+45
View File
@@ -0,0 +1,45 @@
#!/usr/bin/env php
<?php
$opts = getopt("c:j:");
$class = null;
$jobid = null;
if (array_key_exists("c", $opts)) {
$class = $opts['c'];
}
if (array_key_exists("j", $opts)) {
$jobid = $opts['j'];
}
require_once(__DIR__ . "/../app.php");
print("Job Runner Starting\n");
$running = true;
while ($running) {
$job = Job::consumeNextJob($class);
if ($job) {
print("Executing " . $job->getJobClass() . " job " . $job->jobID() . "\n");
try {
$job->run();
} catch (PDOException $e) {
print_r($e);
} catch (Exception $e) {
print_r($e);
}
print("Job finished\n");
} else {
sleep(1);
}
if (file_exists("/tmp/dpr_jobrunner_quit")) {
unlink("/tmp/dpr_jobrunner_quit");
$running = false;
}
}
print("Job Runner Exited Cleanly\n");
+5
View File
@@ -0,0 +1,5 @@
#!/usr/bin/env php
<?php
file_put_contents("/tmp/dpr_jobrunner_quit", "");