]> git.mxchange.org Git - friendica.git/commitdiff
Restructured the way, processes are inserted and removed
authorMichael Vogel <ike@pirati.ca>
Fri, 9 Sep 2016 20:55:49 +0000 (20:55 +0000)
committerMichael Vogel <ike@pirati.ca>
Fri, 9 Sep 2016 20:55:49 +0000 (20:55 +0000)
22 files changed:
boot.php
include/auth_ejabberd.php
include/cli_startup.php
include/cron.php
include/cronhooks.php
include/cronjobs.php
include/dbstructure.php
include/dbupdate.php
include/delivery.php
include/directory.php
include/discover_poco.php
include/expire.php
include/gprobe.php
include/notifier.php
include/onepoll.php
include/poller.php
include/pubsubpublish.php
include/queue.php
include/shadowupdate.php
include/tagupdate.php
include/threadupdate.php
include/update_gcontact.php

index 7097f3f9833c0a01c2b773e52e628d10c5863a4d..87ce53076c0033c94b390c79c42e565defce0172 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -1736,8 +1736,6 @@ function login($register = false, $hiddens=false) {
  */
 function killme() {
 
-       get_app()->end_process();
-
        if (!get_app()->is_backend())
                session_write_close();
 
index d7e91a5b2c4d141147fb5417a22f478fbb58d782..9a9d9accad83ef002b3f398f701b4e95ac3508da 100755 (executable)
@@ -58,8 +58,6 @@ if(is_null($db)) {
        unset($db_host, $db_user, $db_pass, $db_data);
 };
 
-$a->start_process();
-
 // the logfile to which to write, should be writeable by the user which is running the server
 $sLogFile = get_config('jabber','logfile');
 
index 7b15fbfb30857520a64700d8f3882d416ed5edc7..4cb86adef8db34d4673c79e32d52a76b4db3a617 100644 (file)
@@ -19,8 +19,6 @@ function cli_startup() {
        unset($db_host, $db_user, $db_pass, $db_data);
        };
 
-       $a->start_process();
-
        require_once('include/session.php');
 
        load_config('config');
index dde458a4a64c03ba890413f32dd087bee40df8d7..0669f24a1ea9bebf1420a20effaa5626a64409e7 100644 (file)
@@ -27,8 +27,6 @@ function cron_run(&$argv, &$argc){
                unset($db_host, $db_user, $db_pass, $db_data);
        };
 
-       $a->start_process();
-
        require_once('include/session.php');
        require_once('include/datetime.php');
        require_once('include/items.php');
index 986a86dfbb8b3b7a219727c83a72a4ca1210916a..4bb1e5f65960b3b3c1bbad1077d34628388040b0 100644 (file)
@@ -17,8 +17,6 @@ function cronhooks_run(&$argv, &$argc){
                unset($db_host, $db_user, $db_pass, $db_data);
        };
 
-       $a->start_process();
-
        require_once('include/session.php');
        require_once('include/datetime.php');
 
index 6df2dcd035ec86ac9decf5853c52e21ce78153c5..1511efbe0da4da7de2a6eaecdbb054f39645f214 100644 (file)
@@ -27,8 +27,6 @@ function cronjobs_run(&$argv, &$argc){
                unset($db_host, $db_user, $db_pass, $db_data);
        };
 
-       $a->start_process();
-
        require_once('include/session.php');
        require_once('include/datetime.php');
        require_once('include/ostatus.php');
index 4530a78599c5d7472376077e4c7204527c4c48a4..e7514872fd31de12e65012685a82b47b2dac38bf 100644 (file)
@@ -1467,8 +1467,6 @@ function dbstructure_run(&$argv, &$argc) {
                        unset($db_host, $db_user, $db_pass, $db_data);
        }
 
-       $a->start_process();
-
        if ($argc==2) {
                switch ($argv[1]) {
                        case "update":
index 898f459630a1326b198472616fc35719cdfd8f5f..28f1de340b91ca5fb0b8c62d9ab56ca0af87ec49 100644 (file)
@@ -16,8 +16,6 @@ function dbupdate_run(&$argv, &$argc) {
                        unset($db_host, $db_user, $db_pass, $db_data);
        }
 
-       $a->start_process();
-
        load_config('config');
        load_config('system');
 
index 59cab43714a4e1c083983deab6b4da84b0fe5803..fe337743820dcb85940262fefdb4abe099c4d530 100644 (file)
@@ -21,8 +21,6 @@ function delivery_run(&$argv, &$argc){
                unset($db_host, $db_user, $db_pass, $db_data);
        }
 
-       $a->start_process();
-
        require_once("include/session.php");
        require_once("include/datetime.php");
        require_once('include/items.php');
index 381020c8a5642f09d568c26b681e5ee744878400..85476bd5fdf498eaed07787c6c8e695732c2bd1f 100644 (file)
@@ -15,8 +15,6 @@ function directory_run(&$argv, &$argc){
                                unset($db_host, $db_user, $db_pass, $db_data);
        };
 
-       $a->start_process();
-
        load_config('config');
        load_config('system');
 
index 9c9be8209cadf1d47605f67b3c83b467bb802ff3..0b468faea189e522505ed5c686facd22be905406 100644 (file)
@@ -18,8 +18,6 @@ function discover_poco_run(&$argv, &$argc){
        unset($db_host, $db_user, $db_pass, $db_data);
        };
 
-       $a->start_process();
-
        require_once('include/session.php');
        require_once('include/datetime.php');
 
index cfd38d3dcd254f42608e3882edb42aa33eb4cbe5..873c594e8499ea93aeaa55727abeb09f34e81e28 100644 (file)
@@ -16,8 +16,6 @@ function expire_run(&$argv, &$argc){
        unset($db_host, $db_user, $db_pass, $db_data);
        };
 
-       $a->start_process();
-
        require_once('include/session.php');
        require_once('include/datetime.php');
        require_once('include/items.php');
index d3ab028f1e24d911eacfad584f1467f49337c65a..91b9b16e3306077ba2f0c574e6c46e0ce5fe066a 100644 (file)
@@ -18,8 +18,6 @@ function gprobe_run(&$argv, &$argc){
        unset($db_host, $db_user, $db_pass, $db_data);
        };
 
-       $a->start_process();
-
        require_once('include/session.php');
        require_once('include/datetime.php');
 
index 5f700ee71632b96975f058f53d8534d18dc59ca3..0610a4e398df5a9baba95ba58e4e9df7a6927b03 100644 (file)
@@ -54,8 +54,6 @@ function notifier_run(&$argv, &$argc){
                        unset($db_host, $db_user, $db_pass, $db_data);
        }
 
-       $a->start_process();
-
        require_once("include/session.php");
        require_once("include/datetime.php");
        require_once('include/items.php');
index c89e5b257c2164c2dba09edaf0bca4313d4961a2..e77937272088b31884b866471cb842957692e0eb 100644 (file)
@@ -24,8 +24,6 @@ function onepoll_run(&$argv, &$argc){
                unset($db_host, $db_user, $db_pass, $db_data);
        };
 
-       $a->start_process();
-
        require_once('include/session.php');
        require_once('include/datetime.php');
        require_once('include/items.php');
index 83ecb2939533cf7b5ff1d943504d2e8272c9b091..ce2a6be0fa62a1c9c1cccd2b8fd297f77bb9f39d 100644 (file)
@@ -333,7 +333,10 @@ function poller_active_workers() {
 }
 
 if (array_search(__file__,get_included_files())===0){
-  poller_run($_SERVER["argv"],$_SERVER["argc"]);
-  killme();
+       poller_run($_SERVER["argv"],$_SERVER["argc"]);
+
+       get_app()->end_process();
+
+       killme();
 }
 ?>
index 3fff746cb258deb485fb1795a8f857ca4e54e3f3..85637facb23b275eac29a46c0d61c89aa35621b9 100644 (file)
@@ -70,8 +70,6 @@ function pubsubpublish_run(&$argv, &$argc){
                unset($db_host, $db_user, $db_pass, $db_data);
        };
 
-       $a->start_process();
-
        require_once('include/items.php');
 
        load_config('config');
index 6dcdfc89601306d2869c1014e2ec43fccaa34314..ad7079e959ebce2d3a767167bb69e7a0ce693f2b 100644 (file)
@@ -17,8 +17,6 @@ function queue_run(&$argv, &$argc){
                unset($db_host, $db_user, $db_pass, $db_data);
        };
 
-       $a->start_process();
-
        require_once("include/session.php");
        require_once("include/datetime.php");
        require_once('include/items.php');
index e003edea1701bd29eeb0995c3b68cd41038df6a7..74c2a43ebd792fc37cbe1d9c239e71690d53a31e 100644 (file)
@@ -14,8 +14,6 @@ if(is_null($db)) {
        unset($db_host, $db_user, $db_pass, $db_data);
 }
 
-$a->start_process();
-
 load_config('config');
 load_config('system');
 
index f962a8f3ac8b20acd91086c052927f0aee84e267..b12e809772060b7287166c0d03dadcecf3eecf7d 100644 (file)
@@ -14,8 +14,6 @@ if(is_null($db)) {
        unset($db_host, $db_user, $db_pass, $db_data);
 }
 
-$a->start_process();
-
 load_config('config');
 load_config('system');
 
index 454a4680af2a712b99524f20580608895a573b87..e9d9bf6e6b518d99683f52190e7b30e7c4de81ae 100644 (file)
@@ -14,8 +14,6 @@ if(is_null($db)) {
        unset($db_host, $db_user, $db_pass, $db_data);
 }
 
-$a->start_process();
-
 load_config('config');
 load_config('system');
 
index ba0993d14d01882bd7bcbf598da6a3b372c24d4c..88e1817f0b991ff6a0749c2d794b71510ab62b22 100644 (file)
@@ -16,8 +16,6 @@ function update_gcontact_run(&$argv, &$argc){
                unset($db_host, $db_user, $db_pass, $db_data);
        };
 
-       $a->start_process();
-
        require_once('include/Scrape.php');
        require_once("include/socgraph.php");