streams/Zotlabs/Daemon
2020-07-14 18:47:23 -07:00
..
Addon.php move libzot to class 2018-05-31 19:42:13 -07:00
Cache_embeds.php more cache work 2020-05-06 22:01:48 -07:00
CacheThumb.php several little fixes and some re-factoring. 2020-04-16 16:24:01 -07:00
Checksites.php move libzot to class 2018-05-31 19:42:13 -07:00
Cli_suggest.php first phase of daemon refactoring 2016-05-19 19:42:45 -07:00
Cron.php Deprecate the term 'master' from the codebase. 2020-06-15 00:29:56 -07:00
Cron_daily.php Deprecate the term 'master' from the codebase. 2020-06-15 00:29:56 -07:00
Cron_weekly.php Deprecate the term 'master' from the codebase. 2020-06-15 00:29:56 -07:00
Cronhooks.php first phase of daemon refactoring 2016-05-19 19:42:45 -07:00
CurlAuth.php store/[data] => cache 2020-03-03 18:24:26 -08:00
Deliver.php move queue functions to Zotlabs/Lib 2018-07-02 22:43:41 -07:00
Deliver_hooks.php move libzot to class 2018-05-31 19:42:13 -07:00
Delxitems.php Return in case caller needs to process further. 2019-08-19 22:35:17 -04:00
Directory.php Deprecate the term 'master' from the codebase. 2020-06-15 00:29:56 -07:00
Expire.php rewrites - also remove legacy procedural module interface 2019-09-29 22:36:52 -07:00
Externals.php remove blacklist/whitelist 2020-06-14 04:58:27 -07:00
Gprobe.php typo 2018-08-27 19:09:48 -07:00
Importdoc.php only store search info for text filetypes when updating the documentation indexes 2017-05-24 22:34:52 -07:00
Importfile.php split off libsync from libzot 2018-06-04 18:40:11 -07:00
Master.php Deprecate the term 'master' from the codebase. 2020-06-15 00:29:56 -07:00
Notifier.php connect issue and pubstream localhost delivery issue 2020-07-14 18:47:23 -07:00
Onedirsync.php consolidate directory functions into libzotdir 2018-06-04 23:19:16 -07:00
Onepoll.php deprecate simplepie and RSS connections 2020-02-17 14:58:21 -08:00
Poller.php Deprecate the term 'master' from the codebase. 2020-06-15 00:29:56 -07:00
Queue.php regression in latest queue work 2019-02-03 11:21:25 -08:00
README.md Deprecate the term 'master' from the codebase. 2020-06-15 00:29:56 -07:00
Run.php Deprecate the term 'master' from the codebase. 2020-06-15 00:29:56 -07:00
Thumbnail.php new function absolutely_no_comments() and some text cleanup in daemon/thumbnail 2020-06-17 20:30:18 -07:00
Xchan_photo.php set a process timeout for fetching remote xchan photos 2018-09-06 18:33:27 -07:00

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\Run::Summon([ $cmd, $arg1, $argn... ]); 

The Run 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 Run 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.