streams/Code/Daemon
2022-10-06 02:26:09 -07:00
..
Addon.php more cleanup 2022-08-21 17:36:09 +10:00
Cache_embeds.php cleanup 2022-09-05 08:39:58 +10:00
Cache_image.php more cleanup 2022-08-21 17:36:09 +10:00
CacheThumb.php add resizer class to do the cmd-line imagick resize and avoid memory exhaustion 2022-09-11 17:35:47 +10:00
Channel_purge.php cleanup 2022-09-05 08:39:58 +10:00
Checksites.php cleanup 2022-09-05 08:39:58 +10:00
Content_importer.php deprecate z_fetch_url() and friends. Now use Code\Lib\Url::{fetch|get}() 2022-06-23 00:38:34 -07:00
Convo.php it's done 2022-02-15 20:08:28 -08:00
Cron.php cleanup 2022-09-02 06:50:26 +10:00
Cron_daily.php refactor some smelly code 2022-09-02 05:17:27 +10:00
Cron_weekly.php more cleaning 2022-08-15 21:19:29 +10:00
Cronhooks.php it's done 2022-02-15 20:08:28 -08:00
Deliver.php Calling syntax for ActivityStreams::get_compound_property() incompatible with type declaration. Some other minor cleanup. 2022-08-20 13:10:18 +10:00
Deliver_hooks.php it's done 2022-02-15 20:08:28 -08:00
Delxitems.php it's done 2022-02-15 20:08:28 -08:00
Directory.php it's done 2022-02-15 20:08:28 -08:00
Expire.php Calling syntax for ActivityStreams::get_compound_property() incompatible with type declaration. Some other minor cleanup. 2022-08-20 13:10:18 +10:00
File_importer.php cleanup 2022-09-04 08:37:48 +10:00
Gprobe.php deprecate Webfinger::zot_url() 2022-08-28 13:41:22 +10:00
Importdoc.php deprecate the interactive argument to drop_item() 2022-06-26 01:36:02 -07:00
Importfile.php it's done 2022-02-15 20:08:28 -08:00
Notifier.php some fixes to codeberg issue #11 . Remaining: federating edited wall-to-wall posts from a different site to ActivityPub and Hubzilla. They will now federate to streams, including to the original site it was posted. Also fixed delivery reports reporting "updated" which were translated to "update ignored". 2022-10-06 02:26:09 -07:00
Onepoll.php cleanup 2022-09-04 08:37:48 +10:00
Poller.php cleanup 2022-09-04 08:37:48 +10:00
Queue.php it's done 2022-02-15 20:08:28 -08:00
README.md it's done 2022-02-15 20:08:28 -08:00
Run.php cleanup 2022-09-03 11:38:50 +10:00
Thumbnail.php it's done 2022-02-15 20:08:28 -08:00
Xchan_photo.php more cleanup 2022-08-21 17:36:09 +10: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

Code\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 Code\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.