New Dobl-Zwaring Order Import

This commit is contained in:
Frank Schubert
2024-05-08 15:05:44 +02:00
parent 83b10ba922
commit 2228cf011f
4 changed files with 136 additions and 10 deletions
+14 -8
View File
@@ -24,15 +24,19 @@ $mainlog = \mfLoghandler::singleton();
$log = new \mfLog_File();
$log->init(BASEDIR."/var/log/rimo-import.log");
$usage = "Usage: ".$argv[0]." [argument]\n\nAvailable arguments:\n\t--list-rimo-clusters\tLists Clusters returned by Rimo API, then exits\n\t--help\t\t\tLists available arguments\n\nRuns import when no argument is given\n\n";
$usage = "Usage: ".$argv[0]." [argument|rimocluster]\n\nAvailable arguments:\n\t--list-rimo-clusters\tLists Clusters returned by Rimo API, then exits\n\t--help\t\t\tLists available arguments\n\nRuns import when no argument is given. If rimocluster is given, only imports this cluster.\n\n";
$command = false;
$request_cluster = false;
if($argc > 1) {
if($argv[1] == "--list-rimo-clusters") {
$command = "list-rimo-clusters";
} elseif($argv[1] == "--help") {
echo $usage;
exit(0);
echo $usage;
exit(0);
} elseif(strpos($argv[1], "SDI") === 0) {
$command = "cluster_only";
$request_cluster = $argv[1];
} else {
die("Invalid argument.\n\n$usage");
}
@@ -121,11 +125,13 @@ foreach($netowners as $apiOwner) {
}
$addressErrors = [];
/*if($cluster_rimo_id != "SDISalesCluster_327804592385_1709728631") {
// stainz zentrum
continue;
}*/
if($command == "cluster_only" && $request_cluster) {
if($cluster_rimo_id != $request_cluster) {
continue;
}
}
/*
* get Cluster Outline Coords