Esempio n. 1
0
 /**
  * @param \Aws\Sqs\SqsClient
  * @return bool
  * @throws \InvalidArgumentException
  */
 public function setConnection($connection)
 {
     if (!$connection instanceof SqsClient) {
         throw new \InvalidArgumentException('Connection must be an instance of SqsClient.');
     }
     return parent::setConnection($connection);
 }
 public function __construct($options = array())
 {
     parent::__construct();
     if (!empty($options['server'])) {
         $this->server_uri = $options['server'];
     }
     if (!empty($options['tube'])) {
         $this->tube = $options['tube'];
     }
 }
Esempio n. 3
0
 public function __construct($options = array())
 {
     parent::__construct();
     $this->preserveGetLine = true;
     if (!empty($options['preserveGetLine'])) {
         $this->preserveGetLine = (bool) $options['preserveGetLine'];
     }
     if (!empty($options['filePath'])) {
         $this->file_path = $options['filePath'];
     }
 }
Esempio n. 4
0
 public function __construct($options = array())
 {
     parent::__construct();
     if (!empty($options['servers']) && is_array($options['servers'])) {
         $this->servers = $options['servers'];
     }
     if (!empty($options['redis_options']) && is_array($options['redis_options'])) {
         $this->redis_options = array_merge($this->redis_options, $options['redis_options']);
     }
     if (!empty($options['queue'])) {
         $this->queue_name = $options['queue'];
     }
 }
Esempio n. 5
0
 public function __construct($options = array())
 {
     parent::__construct();
     if (!empty($options['server'])) {
         $this->server_uri = $options['server'];
     }
     if (!empty($options['db']) && is_string($options['db'])) {
         $this->db_name = $options['db'];
     }
     if (!empty($options['collection']) && is_string($options['collection'])) {
         $this->collection_name = $options['collection'];
     }
     if (!empty($options['mongo_options']) && is_array($options['mongo_options'])) {
         $this->mongo_options = array_merge($this->mongo_options, $options['mongo_options']);
     }
 }
Esempio n. 6
0
 public function __construct($options = array())
 {
     parent::__construct();
     if (!empty($options['servers']) && is_array($options['servers'])) {
         $this->servers = $options['servers'];
     }
     if (!empty($options['persistent'])) {
         $this->is_persistent = $options['persistent'];
     }
     if (!empty($options['compress']) && is_bool($options['compress'])) {
         $this->use_compression = $options['compress'];
     }
     if (!empty($options['expiry']) && is_numeric($options['expiry'])) {
         $this->expiry = $options['expiry'];
     }
 }
Esempio n. 7
0
 public function __construct($options = array())
 {
     parent::__construct();
     if (!empty($options['region'])) {
         $this->region = $options['region'];
     }
     if (!empty($options['queue'])) {
         $this->queue_url = $options['queue'];
     }
     if (!empty($options['receiving_options']) && is_array($options['receiving_options'])) {
         $this->receiving_options = array_merge($this->receiving_options, $options['receiving_options']);
     }
     if (!empty($options['sqs_options']) && is_array($options['sqs_options'])) {
         $this->sqs_options = array_merge($this->sqs_options, $options['sqs_options']);
     }
 }
Esempio n. 8
0
 public function __construct($options = array())
 {
     parent::__construct();
     if (!empty($options['token'])) {
         $this->token = $options['token'];
     }
     if (!empty($options['project_id'])) {
         $this->project_id = $options['project_id'];
     }
     if (!empty($options['queue'])) {
         $this->queue_name = $options['queue'];
     }
     if (!empty($options['msg_options']) && is_array($options['msg_options'])) {
         $this->default_send_options = array_merge($this->default_send_options, $options['msg_options']);
     }
 }
 public function __construct($options = array())
 {
     parent::__construct();
     if (!empty($options['queue'])) {
         $this->queue_name = $options['queue'];
     }
     if (!empty($options['uri'])) {
         $this->uri = $options['uri'];
     }
     if (isset($options['merge_headers'])) {
         $this->merge_headers = (bool) $options['merge_headers'];
     }
     if (isset($options['read_timeout'])) {
         $this->read_timeout = (int) $options['read_timeout'];
     }
     if (isset($options['ack'])) {
         $this->ack = (bool) $options['ack'];
     }
 }
 public function __construct($options = array())
 {
     parent::__construct();
     if (!empty($options['servers'])) {
         $this->servers = $options['servers'];
     }
     if (!empty($options['redis_options']) && is_array($options['redis_options'])) {
         $this->redis_options = array_merge($this->redis_options, $options['redis_options']);
     }
     if (!empty($options['queue'])) {
         $this->queue_name = $options['queue'];
     }
     if (!empty($options['expiry'])) {
         $this->expiry = $options['expiry'];
     }
     if (!empty($options['order_key'])) {
         $this->order_key = $options['order_key'];
         $this->redis_options['prefix'] = $this->queue_name . ':';
     }
     if (!empty($options['correlation_key'])) {
         $this->correlation_key = $options['correlation_key'];
     }
 }
Esempio n. 11
0
 /**
  * @return \PDO
  */
 public function getConnection()
 {
     return parent::getConnection();
 }
Esempio n. 12
0
 public function releaseJob($jobId = null)
 {
     unset($this->currentJobs[$jobId]);
     $this->dataSource->release($jobId);
 }