]> git.mxchange.org Git - friendica.git/commitdiff
Standards: Rename App methods
authorHypolite Petovan <mrpetovan@gmail.com>
Sat, 30 Jun 2018 18:07:01 +0000 (14:07 -0400)
committerHypolite Petovan <mrpetovan@gmail.com>
Mon, 16 Jul 2018 23:38:14 +0000 (19:38 -0400)
- Rename App->max_processes_reached to App->isMaxProcessesReached
- Rename App->maxload_reached to App->isMaxLoadReached

index.php
src/App.php
src/Core/Worker.php

index 3a2067471edddc89ee865ef3cc461039696c7e2f..5da31f100e6b8ffda0c9b36f4b29db06fa4a5cfe 100644 (file)
--- a/index.php
+++ b/index.php
@@ -42,7 +42,7 @@ if (!$a->mode == App::MODE_INSTALL) {
 
        Config::load();
 
-       if ($a->max_processes_reached() || $a->maxload_reached()) {
+if ($a->isMaxProcessesReached() || $a->isMaxLoadReached()) {
                header($_SERVER["SERVER_PROTOCOL"] . ' 503 Service Temporarily Unavailable');
                header('Retry-After: 120');
                header('Refresh: 120; url=' . System::baseUrl() . "/" . $a->query_string);
index 1eca4329f5146a3e7cdba8e1e78a80d2c2c21de7..eca5c4b7dbda4f7624de6f58386e64aba30fab54 100644 (file)
@@ -972,7 +972,7 @@ class App
         *
         * @return bool Is the limit reached?
         */
-       public function max_processes_reached()
+       public function isMaxProcessesReached()
        {
                // Deactivated, needs more investigating if this check really makes sense
                return false;
@@ -1052,7 +1052,7 @@ class App
         *
         * @return bool Is the load reached?
         */
-       public function maxload_reached()
+       public function isMaxLoadReached()
        {
                if ($this->is_backend()) {
                        $process = 'backend';
index 0d51bb725d97ef487bffd22b05945ea629410b44..897a80111d67d4d6cc6c7309c8ee645ae3894d02 100644 (file)
@@ -41,7 +41,7 @@ class Worker
                self::$up_start = microtime(true);
 
                // At first check the maximum load. We shouldn't continue with a high load
-               if ($a->maxload_reached()) {
+               if ($a->isMaxLoadReached()) {
                        logger('Pre check: maximum load reached, quitting.', LOGGER_DEBUG);
                        return;
                }
@@ -75,7 +75,7 @@ class Worker
                }
 
                // Possibly there are too much database processes that block the system
-               if ($a->max_processes_reached()) {
+               if ($a->isMaxProcessesReached()) {
                        logger('Pre check: maximum processes reached, quitting.', LOGGER_DEBUG);
                        return;
                }
@@ -203,7 +203,7 @@ class Worker
                }
 
                // Constantly check the number of parallel database processes
-               if ($a->max_processes_reached()) {
+               if ($a->isMaxProcessesReached()) {
                        logger("Max processes reached for process ".$mypid, LOGGER_DEBUG);
                        return false;
                }