Skip to content

Commit

Permalink
Merge pull request #1108 from sergejey/alpha
Browse files Browse the repository at this point in the history
Main cycle restart fix
  • Loading branch information
sergejey authored Jan 10, 2024
2 parents e2c90bb + a7281a3 commit 01b47e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
4 changes: 1 addition & 3 deletions scripts/cycle_main.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
include_once("./lib/loader.php");
include_once("./lib/threads.php");

set_time_limit(0);

include_once("./load_settings.php");
include_once(DIR_MODULES . "control_modules/control_modules.class.php");

Expand Down Expand Up @@ -53,7 +51,7 @@
$started_time = time();

echo date("H:i:s") . " running " . basename(__FILE__) . "\n";

set_time_limit(0);
while (1) {
if (time() - $checked_time > 5) {
$checked_time = time();
Expand Down
12 changes: 1 addition & 11 deletions scripts/startup_maintenance.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
<?php

/*
chdir('../');
include_once("./config.php");
include_once("./lib/loader.php");
$db=new mysql(DB_HOST, '', DB_USER, DB_PASSWORD, DB_NAME); // connecting to database
include_once("./load_settings.php");
*/
/*
* @version 0.1 (auto-set)
*/
Expand All @@ -18,6 +9,7 @@
include_once("./config.php");
include_once("./lib/loader.php");
include_once("./load_settings.php");
set_time_limit(10 * 60);
}

if (isset($_SERVER['REQUEST_URI'])) {
Expand All @@ -26,8 +18,6 @@
DebMes("Running from command line: " . implode(' ', $argv), 'maintenance');
}

set_time_limit(10 * 60);

echo "<pre>\n";

DebMes("Running maintenance script", 'maintenance');
Expand Down

0 comments on commit 01b47e2

Please sign in to comment.