/home/techb158/dev.balacoffee.com/vendor/laravel/framework/src/Illuminate/Queue
NameSizeModeActions
Capsule/-0755rm
Connectors/-0755rm
Console/-0755rm
Events/-0755rm
Failed/-0755rm
Jobs/-0755rm
Middleware/-0755rm
BeanstalkdQueue.php48490644editdlrm
CallQueuedClosure.php25250644editdlrm
CallQueuedHandler.php83740644editdlrm
composer.json16690644editdlrm
DatabaseQueue.php113930644editdlrm
InteractsWithQueue.php13970644editdlrm
InvalidPayloadException.php3750644editdlrm
LICENSE.md10750644editdlrm
Listener.php56430644editdlrm
ListenerOptions.php8390644editdlrm
LuaScripts.php44190644editdlrm
ManuallyFailedException.php1250644editdlrm
MaxAttemptsExceededException.php1300644editdlrm
NullQueue.php14220644editdlrm
Queue.php107770644editdlrm
QueueManager.php70540644editdlrm
QueueServiceProvider.php91960644editdlrm
README.md12170644editdlrm
RedisQueue.php94340644editdlrm
SerializableClosure.php9500644editdlrm
SerializableClosureFactory.php6680644editdlrm
SerializesAndRestoresModelIdentifiers.php34680644editdlrm
SerializesModels.php33250644editdlrm
SqsQueue.php56880644editdlrm
SyncQueue.php39500644editdlrm
Worker.php245520644editdlrm
WorkerOptions.php24130644editdlrm
Edit: /home/techb158/dev.balacoffee.com/vendor/laravel/framework/src/Illuminate/Queue/SqsQueue.php (5688B)
sqs = $sqs; $this->prefix = $prefix; $this->default = $default; $this->suffix = $suffix; $this->dispatchAfterCommit = $dispatchAfterCommit; } /** * Get the size of the queue. * * @param string|null $queue * @return int */ public function size($queue = null) { $response = $this->sqs->getQueueAttributes([ 'QueueUrl' => $this->getQueue($queue), 'AttributeNames' => ['ApproximateNumberOfMessages'], ]); $attributes = $response->get('Attributes'); return (int) $attributes['ApproximateNumberOfMessages']; } /** * Push a new job onto the queue. * * @param string $job * @param mixed $data * @param string|null $queue * @return mixed */ public function push($job, $data = '', $queue = null) { return $this->enqueueUsing( $job, $this->createPayload($job, $queue ?: $this->default, $data), $queue, null, function ($payload, $queue) { return $this->pushRaw($payload, $queue); } ); } /** * Push a raw payload onto the queue. * * @param string $payload * @param string|null $queue * @param array $options * @return mixed */ public function pushRaw($payload, $queue = null, array $options = []) { return $this->sqs->sendMessage([ 'QueueUrl' => $this->getQueue($queue), 'MessageBody' => $payload, ])->get('MessageId'); } /** * Push a new job onto the queue after a delay. * * @param \DateTimeInterface|\DateInterval|int $delay * @param string $job * @param mixed $data * @param string|null $queue * @return mixed */ public function later($delay, $job, $data = '', $queue = null) { return $this->enqueueUsing( $job, $this->createPayload($job, $queue ?: $this->default, $data), $queue, $delay, function ($payload, $queue, $delay) { return $this->sqs->sendMessage([ 'QueueUrl' => $this->getQueue($queue), 'MessageBody' => $payload, 'DelaySeconds' => $this->secondsUntil($delay), ])->get('MessageId'); } ); } /** * Pop the next job off of the queue. * * @param string|null $queue * @return \Illuminate\Contracts\Queue\Job|null */ public function pop($queue = null) { $response = $this->sqs->receiveMessage([ 'QueueUrl' => $queue = $this->getQueue($queue), 'AttributeNames' => ['ApproximateReceiveCount'], ]); if (! is_null($response['Messages']) && count($response['Messages']) > 0) { return new SqsJob( $this->container, $this->sqs, $response['Messages'][0], $this->connectionName, $queue ); } } /** * Delete all of the jobs from the queue. * * @param string $queue * @return int */ public function clear($queue) { return tap($this->size($queue), function () use ($queue) { $this->sqs->purgeQueue([ 'QueueUrl' => $this->getQueue($queue), ]); }); } /** * Get the queue or return the default. * * @param string|null $queue * @return string */ public function getQueue($queue) { $queue = $queue ?: $this->default; return filter_var($queue, FILTER_VALIDATE_URL) === false ? $this->suffixQueue($queue, $this->suffix) : $queue; } /** * Add the given suffix to the given queue name. * * @param string $queue * @param string $suffix * @return string */ protected function suffixQueue($queue, $suffix = '') { if (Str::endsWith($queue, '.fifo')) { $queue = Str::beforeLast($queue, '.fifo'); return rtrim($this->prefix, '/').'/'.Str::finish($queue, $suffix).'.fifo'; } return rtrim($this->prefix, '/').'/'.Str::finish($queue, $this->suffix); } /** * Get the underlying SQS instance. * * @return \Aws\Sqs\SqsClient */ public function getSqs() { return $this->sqs; } }