Restructured the way, processes are inserted and removed

This commit is contained in:
Michael Vogel 2016-09-09 20:55:49 +00:00
parent 22f32d9721
commit 1caa87dce6
22 changed files with 5 additions and 44 deletions

View File

@ -1736,8 +1736,6 @@ function login($register = false, $hiddens=false) {
*/
function killme() {
get_app()->end_process();
if (!get_app()->is_backend())
session_write_close();

View File

@ -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');

View 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');

View 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');

View 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');

View 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');

View 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":

View 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');

View 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');

View 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');

View 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');

View 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');

View 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');

View 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');

View 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');

View 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();
}
?>

View 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');

View 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');

View 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');

View 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');

View 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');

View 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");