Browse Source

make php scripts single-shot

Jan Behrens 1 year ago
parent
commit
5645b9ddc1
4 changed files with 7 additions and 7 deletions
  1. 1 1
      patchpanel/index.php
  2. 2 2
      poll_HV_data.php
  3. 2 2
      poll_adei_data.php
  4. 2 2
      poll_database.php

+ 1 - 1
patchpanel/index.php

@@ -110,7 +110,7 @@
     if ($_POST["configurationload"] == "(active configuration)")
 	{
         shell_exec('cd .. ; php ./poll_database.php');
-        
+
         $handle = fopen("data/activeIEconfig.txt", "r");
         if ($handle)
         {

+ 2 - 2
poll_HV_data.php

@@ -35,7 +35,7 @@
     $starttime = $calltime;
     $n = 0;
     //echo "started ".date("r", $starttime).PHP_EOL;
-    do {
+//    do {
         $n++;
         $currenttime = time();
         $delaytime = 10 - ($currenttime % 10);
@@ -212,7 +212,7 @@
         //echo $n." ".time().PHP_EOL;
 
     }
-    while (time() < $starttime + 50);
+//    while (time() < $starttime + 50);
 
     //echo "stopped".date("r", time()).PHP_EOL;
     //echo "Data extraction done.".PHP_EOL;

+ 2 - 2
poll_adei_data.php

@@ -64,7 +64,7 @@ date_default_timezone_set('Europe/Berlin');
 
 $counter = 0;
 $calltime = time();
-do {
+//do {
         $errorcount = 0;
         $errormessage = '<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>';
 
@@ -146,7 +146,7 @@ do {
         if ($wait_till <= $stoptime) sleep(3);
         else time_sleep_until($wait_till);
 
-} while (($counter < 10) && (time() < $calltime + 51));
+//} while (($counter < 10) && (time() < $calltime + 51));
 
 //echo "All loops done.".PHP_EOL;
 

+ 2 - 2
poll_database.php

@@ -201,7 +201,7 @@
 
     $counter = 0;
     $calltime = time();
-    do {
+//    do {
         $errorcount = 0;
         $errormessage = "<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>";
 
@@ -305,7 +305,7 @@
         else {
             time_sleep_until($wait_till);
         }
-    } while ($counter < 10 && time() < $calltime + 51);
+//    } while ($counter < 10 && time() < $calltime + 51);
 
     //echo "All loops done.".PHP_EOL;