streams/Zotlabs/Daemon
2021-01-27 20:55:55 -08:00
..
Addon.php move libzot to class 2018-05-31 19:42:13 -07:00
Cache_embeds.php image caching storage improvements 2020-08-16 21:55:59 -07:00
CacheThumb.php several little fixes and some re-factoring. 2020-04-16 16:24:01 -07:00
Channel_purge.php - disable Convo (fetches conversation children - the opposite of fetch_parents) because it simply isn't reliable (only implemented in Mastodon) and is also causing load issues on some sites. 2021-01-26 11:29:34 -08:00
Checksites.php move libzot to class 2018-05-31 19:42:13 -07:00
Content_importer.php provide content_import in core and run it automatically if you choose to import posts when creating a clone. So one step import *if* you import from a site instead of a file (yay - finally). This required slight modifications to api_auth because it always looked for a cached identity and in this case the identity was just created and will not yet be in cache. 2020-12-10 16:32:29 -08:00
Convo.php syntax 2020-10-21 15:37:58 -07:00
Cron.php deprecate daemon/externals 2020-10-27 01:45:46 -07:00
Cron_daily.php cleanup deprecated directory code 2020-10-26 19:51:59 -07:00
Cron_weekly.php cleanup deprecated directory code 2020-10-26 19:51:59 -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 more directory cleanup 2020-09-01 22:55:46 -07:00
Expire.php rewrites - also remove legacy procedural module interface 2019-09-29 22:36:52 -07:00
File_importer.php provide content_import in core and run it automatically if you choose to import posts when creating a clone. So one step import *if* you import from a site instead of a file (yay - finally). This required slight modifications to api_auth because it always looked for a cached identity and in this case the identity was just created and will not yet be in cache. 2020-12-10 16:32:29 -08: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
Notifier.php use hardwired ap schema 2021-01-22 16:59:56 -08:00
Onedirsync.php consolidate directory functions into libzotdir 2018-06-04 23:19:16 -07:00
Onepoll.php add threadlistener support to outbox and explain why 2021-01-23 14:00:16 -08:00
Poller.php migrate existing xchan photos as a small background task 2020-09-14 19:21:44 -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 Provide infrastructure for porting queueworker addon and fix some nasty queueworker bugs 2021-01-27 20:55:55 -08: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 move cached xchan photos to filesystem 2020-08-24 21:36:56 -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.