Omeka_Job_Dispatcher_Adapter_Beanstalk

class Omeka_Job_Dispatcher_Adapter_Beanstalk

Package: Job\Dispatcher\Adapter

Job dispatcher for Beanstalk.

Requires Pheanstalk library (Beanstalk client) in order to work properly.

This adapter must be instantiated with the ‘host’ option (IP address ofbeanstalk daemon) in order to work properly.

constant DEFAULT_TTR

Because of the potential for long-running imports (and the fact that jobs are not idemopotent), TTR should be pretty high by default.

property _pheanstalk
property _options
setQueueName(string $name)

Beanstalk understands the concept of ‘tubes’ instead of named queues, so set the appropriate ‘tube’ to dispatch jobs.

Parameters:
  • $name (string) –
send($encodedJob, $metadata)
Parameters:
  • $encodedJob (unknown) –
  • $metadata (unknown) –
_pheanstalk()
getOption($name)
Parameters:
  • $name (unknown) –
__construct(array|null $options)
Parameters:
  • $options (array|null) – Optional Options to instantiate in the adapter.
_setOptions($options)
Parameters:
  • $options (unknown) –
hasOption(string $name)

Whether or not the given option has been set.

Parameters:
  • $name (string) –