����JFIF��x�x����'
Server IP : 78.140.185.180 / Your IP : 18.219.224.246 Web Server : LiteSpeed System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : builderbox ( 1072) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/builderbox/public_html/vendor/laravel/horizon/src/ |
Upload File : |
<?php namespace Laravel\Horizon; use Illuminate\Contracts\Redis\Factory as RedisFactory; use Laravel\Horizon\Contracts\HorizonCommandQueue; class RedisHorizonCommandQueue implements HorizonCommandQueue { /** * The Redis connection instance. * * @var \Illuminate\Contracts\Redis\Factory */ public $redis; /** * Create a new command queue instance. * * @param \Illuminate\Contracts\Redis\Factory $redis * @return void */ public function __construct(RedisFactory $redis) { $this->redis = $redis; } /** * Push a command onto a given queue. * * @param string $name * @param string $command * @param array $options * @return void */ public function push($name, $command, array $options = []) { $this->connection()->rpush('commands:'.$name, json_encode([ 'command' => $command, 'options' => $options, ])); } /** * Get the pending commands for a given queue name. * * @param string $name * @return array */ public function pending($name) { $length = $this->connection()->llen('commands:'.$name); if ($length < 1) { return []; } $results = $this->connection()->pipeline(function ($pipe) use ($name, $length) { $pipe->lrange('commands:'.$name, 0, $length - 1); $pipe->ltrim('commands:'.$name, $length, -1); }); return collect($results[0])->map(function ($result) { return (object) json_decode($result, true); })->all(); } /** * Flush the command queue for a given queue name. * * @param string $name * @return void */ public function flush($name) { $this->connection()->del('commands:'.$name); } /** * Get the Redis connection instance. * * @return \Illuminate\Redis\Connections\Connection */ protected function connection() { return $this->redis->connection('horizon'); } }