streams/Code/Daemon
2022-06-05 15:29:27 -07:00
..
Addon.php it's done 2022-02-15 20:08:28 -08:00
Cache_embeds.php it's done 2022-02-15 20:08:28 -08:00
Cache_image.php it's done 2022-02-15 20:08:28 -08:00
CacheThumb.php it's done 2022-02-15 20:08:28 -08:00
Channel_purge.php it's done 2022-02-15 20:08:28 -08:00
Checksites.php it's done 2022-02-15 20:08:28 -08:00
Content_importer.php it's done 2022-02-15 20:08:28 -08:00
Convo.php it's done 2022-02-15 20:08:28 -08:00
Cron.php it's done 2022-02-15 20:08:28 -08:00
Cron_daily.php it's done 2022-02-15 20:08:28 -08:00
Cron_weekly.php it's done 2022-02-15 20:08:28 -08:00
Cronhooks.php it's done 2022-02-15 20:08:28 -08:00
CurlAuth.php it's done 2022-02-15 20:08:28 -08:00
Deliver.php it's done 2022-02-15 20:08:28 -08: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 it's done 2022-02-15 20:08:28 -08:00
File_importer.php it's done 2022-02-15 20:08:28 -08:00
Gprobe.php profile photo issues 2022-06-05 15:29:27 -07:00
Importdoc.php it's done 2022-02-15 20:08:28 -08:00
Importfile.php it's done 2022-02-15 20:08:28 -08:00
Notifier.php Don't send poll responses to hyperdrive 2022-04-03 20:58:48 -07:00
Onedirsync.php it's done 2022-02-15 20:08:28 -08:00
Onepoll.php issues from the php log 2022-03-04 23:01:35 -08:00
Poller.php it's done 2022-02-15 20:08:28 -08: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 it's done 2022-02-15 20:08:28 -08:00
Thumbnail.php it's done 2022-02-15 20:08:28 -08:00
Xchan_photo.php it's done 2022-02-15 20:08:28 -08: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.