Coming from #1111254: Document the Hostmaster API I'd like to document hook_hosting_queues, which boils down to documenting the following array from hosting_get_queues:
$defaults = array(
'type' => 'serial',
'max_threads' => 6,
'threshold' => '100',
'min_threads' => 1,
'timeout' => strtotime("10 minutes", 0),
'frequency' => strtotime("5 minutes", 0),
'items' => 5,
'enabled' => TRUE,
'singular' => t('item'),
'plural' => t('items'),
);
What are the threads about, and what is the 'threshold' about eh?
Comments
Comment #1
omega8cc commentedIt is used a few lines later in the
modules/hosting/hosting.queues.incComment #2
omega8cc commentedBut yeah, reading "the code as documentation" is always easier than "translating code to documentation" :)
Comment #3
steven jones commentedIndeed, I think my original questions stand ;)
Comment #4
anarcat commentedI think the idea of the threshold is that it's a heuristic to determine how many threads we need to fire up to process the tasks in that batch, to avoid going over memory limits and things like that.
For example, hosting_cron allows between 6 and 12 cron jobs to run at a time on one server... Presumably this could be tuned...
Comment #5
ergonlogicComment #6
helmo commentedThe reference is in hosting.api.php, lets not duplicate that defaults code.