Omeka_Job_Dispatcher_Adapter_BackgroundProcess

Package: Job\Dispatcher\Adapter

class Omeka_Job_Dispatcher_Adapter_BackgroundProcess

extends Omeka_Job_Dispatcher_Adapter_AbstractAdapter

implements Omeka_Job_Dispatcher_Adapter_AdapterInterface

Job dispatcher that uses Omeka’s existing background process API.

Omeka_Job_Dispatcher_Adapter_BackgroundProcess::send($encodedJob, $metadata)

Dispatches a background process that executes the given job.

NOTE: No user account is bootstrapped when background.php runs (since it is CLI), so if a process triggers its own subprocesses, those will be listed as belonging to no user (ID = 0).

Parameters:
  • $encodedJob

  • $metadata

Omeka_Job_Dispatcher_Adapter_BackgroundProcess::setProcessDispatcher(Omeka_Job_Process_Dispatcher $dispatcher)

For test purposes.

Parameters:
Omeka_Job_Dispatcher_Adapter_BackgroundProcess::getProcessDispatcher()
Omeka_Job_Dispatcher_Adapter_BackgroundProcess::__construct($options = null)
Parameters:
  • $options (array|null) – Optional Options to instantiate in the adapter.

Omeka_Job_Dispatcher_Adapter_BackgroundProcess::_setOptions($options)
Parameters:
  • $options

Omeka_Job_Dispatcher_Adapter_BackgroundProcess::getOption($name)

Retrieve an option by name as it was passed to the constructor of the adapter.

Parameters:
  • $name (string) –

Omeka_Job_Dispatcher_Adapter_BackgroundProcess::hasOption($name)

Whether or not the given option has been set.

Parameters:
  • $name (string) –

Omeka_Job_Dispatcher_Adapter_BackgroundProcess::setQueueName($name)

Adapter implementations do not understand named queues by default, so this default implementation returns false. Override this in subclasses to specify the correct behavior.

Parameters:
  • $name