Hubzilla core code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Max Kostikov 63aa3948e5 resolve merge conflict 8 months ago
..
Addon.php daemon_addon hook - lets plugins create custom background processes. 3 years ago
Cache_embeds.php cache embeds in the background on initial storage rather than on first access 1 year ago
Checksites.php consolidate hubloc storage 3 years ago
Cli_suggest.php first phase of daemon refactoring 4 years ago
Cron.php hopefully fix query for postgres 8 months ago
Cron_daily.php resolve merge conflict 8 months ago
Cron_weekly.php improve removed_channel final cleanup. Hubzilla issue #386 2 years ago
Cronhooks.php first phase of daemon refactoring 4 years ago
CurlAuth.php Return in the case of further processing 11 months ago
Deliver.php dreport updates 1 year ago
Deliver_hooks.php first phase of daemon refactoring 4 years ago
Directory.php daemon master: create some compatibility code 4 years ago
Expire.php last commented expiration setting in admin 2 years ago
Externals.php null_date conversion; phase 1 3 years ago
Gprobe.php cut down on a few extraneous gprobe processes 2 years ago
Importdoc.php only store search info for text filetypes when updating the documentation indexes 3 years ago
Importfile.php test recursive dav copy 2 years ago
Master.php Return in the case of further processing 11 months ago
Notifier.php Notify on custom items - rework hooks 10 months ago
Onedirsync.php first phase of daemon refactoring 4 years ago
Onepoll.php onepoll: do not update dead feeds 8 months ago
Poller.php Return in the case of further processing 11 months ago
Queue.php Use dba_driver.php::db_getfunc() 1 year ago
README.md document the daemon classes 4 years ago
Ratenotif.php put deferred queue logic every place we create a delivery process (except for protocol 'friend requests' which aren't likely to swamp the delivery system). Remove it from the queue_delivery function which was too late to do anything. 2 years ago
Thumbnail.php add thumbnail hook 2 years ago

README.md

Daemon (background) Processes

This directory provides background tasks which are executed by a command-line process and detached from normal web processing.

Background tasks are invoked by calling

Zotlabs\Daemon\Master::Summon([ $cmd, $arg1, $argn... ]); 

The Master class loads the desired command file and passes the arguments.

To create a background task ‘Foo’ use the following template.

<?php

namespace Zotlabs\Daemon;

class Foo {

    static public function run($argc,$argv) {
        // do something
    }
}

The Master class “summons” the command by creating an executable script from the provided arguments, then it invokes “Release” to execute the script detached from web processing. This process calls the static::run() function with any command line arguments using the traditional argc, argv format.

Please note: These are real $argc, $argv variables passed from the command line, and not the parsed argc() and argv() functions/variables which were obtained from parsing path components of the request URL by web processes.

Background processes do not emit displayable output except through logs. They should also not make any assumptions about their HTML and web environment (as they do not have a web environment), particularly with respect to global variables such as $_SERVER, $_REQUEST, $_GET, $_POST, $_COOKIES, and $_SESSION.