Checks if queue exists

@return bool
338598
protected function queueExists()
    {
        if (isset($this->queueUrl)) {
            return true;
        }

        if ($this->getCache()->has($this->getUrlCacheKey())) {
            $this->queueUrl = $this->getCache()->get($this->getUrlCacheKey());
            return true;
        }

        try {
            $result = $this->getClient()->getQueueUrl([
                'QueueName' => $this->getQueueNameWithPrefix()
            ]);

            $this->queueUrl = $result->get('QueueUrl');

            if ($result->hasKey('QueueUrl')) {
                $this->queueUrl = $result->get('QueueUrl');
            } else {
                $this->logError('Queue url for'. $this->getQueueNameWithPrefix() .' not fetched');
            }

            if ($this->queueUrl !== null) {
                $this->getCache()->put($this->queueUrl, $this->getUrlCacheKey());
                $this->logDebug('Queue url '. $this->queueUrl .' fetched and cached');
                return true;
            }
        } catch (AwsException $e) {
            $this->logWarning('Fetching queue url for '. $this->getQueueNameWithPrefix() .' failed. MSG: '. $e->getAwsErrorMessage());
        }

        return false;
    }
120085
public static function processQueue()
    {
        if (count(self::$request_queue) == 0) {
            return false;
        }

        do {
            $multi_handle = curl_multi_exec(self::$queue_handle, $active);
        } while ($multi_handle == CURLM_CALL_MULTI_PERFORM);

        while ($active && $multi_handle == CURLM_OK) {
            if (curl_multi_select(self::$queue_handle) != -1) {
                do {
                    $multi_handle = curl_multi_exec(self::$queue_handle, $active);
                } while ($multi_handle == CURLM_CALL_MULTI_PERFORM);
            }
        }

        foreach (self::$request_queue as $key => $value) {
            $error = curl_error($value['handle']);
            if (!empty($error)) {
                $info = array(
                    'is_success'  => false,
                    'url'         => $value['url'],
                    'errorno'     => curl_errno($value['handle']),
                    'error'       => $error,
                    'queue'       => 'ON'
                );

                $result = false;
                $header = '';
            } else {
                $info = curl_getinfo($value['handle']);
                $info['is_success'] = true;
                $info['queue'] = 'ON';

                $body = curl_multi_getcontent($value['handle']);
                list($header, $result) = explode("\r\n\r\n", $body, 2);
            }

            self::logProfiling($info);
            self::$request_queue[$key]['response'] = new Response($info, $result, $header);
            $callback = $value['callback'];
            $callback(self::$request_queue[$key]['response']);

            curl_multi_remove_handle(self::$queue_handle, self::$request_queue[$key]['handle']);
        }

        curl_multi_close(self::$queue_handle);
        self::$request_queue = array();
        return true;
    }
919087
public function exists()
    {
        if (!Data::table($this->name)->exists())
            throw new LazerException('Table "' . $this->name . '" does not exists');

        if (!Config::table($this->name)->exists())
            throw new LazerException('Config "' . $this->name . '" does not exists');

        return TRUE;
    }
526500
protected function need_to_update_queue($queue_name)
    {
        foreach ($this->getCurrentSubscribers($queue_name) as $subscriber) {
            if ($subscriber->url == $this->subscriber_url)
                return false;
        }
        return true;
    }
611489
public function exists(string $taskID, string $listID = ''): bool
    {
        $list = $this->getListData($listID);
        if (isset($list[$taskID])) {
            $app = App::get();
            return $app->data->exists($this->getTaskDataKey($taskID, $listID));
        }
        return false;
    }
755081
public function table_exists() {
		return (bool) $this->db->get_row( $this->db->prepare('SHOW TABLES LIKE %s', $this->table ) );
	}
929590
def exists(self, qname):
        '''
        
        '''
        try:
            # First if not exists() -> exit
            if self.conn.queue_exists(qname):
                return True
            return False
        except pyrax.exceptions as err_msg:
            log.error('RackSpace API got some problems during '
                      'existing queue check: %s',
                      err_msg)
        return False
1363725
public function exists()
    {
        $existsQuery = new Exists($this);

        // set the current select for the exists query
        $existsQuery->setSelect($this);

        // run the callbacks to retirve the results
        $result = $existsQuery->executeResultFetcher();

        if (isset($result[0]['exists']))
        {
            return (bool) $result[0]['exists'];
        }
        
        return false;
    }
782833
private function queueExists($queueName)
    {
        try {
            $this->resolveUrl($queueName);

            return true;
        } catch (\InvalidArgumentException $exception) {
            return false;
        } catch (SqsException $exception) {
            if ($previousException = $exception->getPrevious()) {
                switch ($previousException->getCode()) {
                    case self::AWS_SQS_EXCEPTION_BAD_REQUEST:
                    case self::AWS_SQS_EXCEPTION_NOT_FOUND:
                        return false;
                }
            }

            throw $exception;
        }
    }
573961
public function reserve()
    {
        foreach ($this->queues as $queue) {
            $this->getLogger()->debug(
                'Checking {queue} for jobs',
                array(
                    'queue' => $queue
                )
            );
            $job = $queue->dequeue();
            if (false === (null === $job)) {
                $this->getLogger()->info(
                    'Found job {job} on queue {queue}',
                    array(
                        'job' => $job,
                        'queue' => $queue,
                    )
                );

                return $job;
            }
        }

        return null;
    }
593502
public function exists($name, $data)
    {
        $servers = isset($this->config['servers']) ? $this->config['servers'] : null;

        if ((!$name || ($name && $name !== $data['name'])) &&
            isset($data['name']) && isset($servers[$data['name']])
        ) {
            return true;
        }
    }
587919
public function get($queueName)
    {
        if (! is_null($this->expire) )
        {
            $this->migrateAllExpiredJobs($queueName);
        }

        $objectReids = $this->__handler;
        $objectReids->loadScripts('queueGet');

        $queueData = $objectReids->queueGet($queueName, $queueName.':reserved', time() + $this->expire);

        if( ! is_null($queueData) )
        {
            return new system_queue_message_redis($queueData);
        }

        return false;
    }
852907
public function getQueue()
    {
        $this->queue = array_values(array_diff(array_unique(array_merge($this->queue, array_keys($this->sitemaps))), $this->history));
        return $this->queue;
    }
1238963
protected function processLocalQueue(): bool
    {
        $now = time();
        foreach ($this->queue as $key => $job) {
            $this->db->{$this->scheduler->getJobQueue()}->updateOne(
                ['_id' => $job['_id'], '$isolated' => true],
                ['$setOnInsert' => $job],
                ['upsert' => true]
            );

            if ($job['options']['at'] <= $now) {
                $this->logger->info('postponed job ['.$job['_id'].'] ['.$job['class'].'] can now be executed', [
                    'category' => get_class($this),
                    'pm' => $this->process,
                ]);

                unset($this->queue[$key]);
                $job['options']['at'] = 0;

                if (true === $this->collectJob($job, JobInterface::STATUS_PROCESSING, JobInterface::STATUS_POSTPONED)) {
                    $this->processJob($job);
                }
            }
        }

        return true;
    }
26175
def queue_exists(self, queue):
        
        try:
            self.channel.queue_declare(queue=queue, passive=True)
        except AMQPChannelException, e:
            if e.amqp_reply_code == 404:
                return False
            raise e
        else:
            return True
1218492
def exists(self):
        
        t = self.wait_timeout
        self.wait_timeout = 0
        try:
            self.reload()
            return True
        except NoSuchElementException:
            return False
        finally:
            self.wait_timeout = t
298253
public function isQueueOnline($queue)
    {
        if ($queue->alert_heartbeat_greater_than < 1) {
            return true;
        }

        if (Carbon::now()->diffInSeconds($queue->last_heartbeat) <= $queue->alert_heartbeat_greater_than) {
            if ($this->eye->status()->isSick('queue_online_'.$queue->id)) {
                $this->eye->notifier()->alert(new Online(['queue' => $queue]));
            }

            $this->eye->status()->setHealthy('queue_online_'.$queue->id);

            return true;
        }

        if ($this->eye->status()->isHealthy('queue_online_'.$queue->id)) {
            $this->eye->notifier()->alert(new Offline(['queue' => $queue]));
        }

        $this->eye->status()->setSick('queue_online_'.$queue->id);

        return false;
    }