!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/notification/vendor/illuminate/queue/Console/   drwxr-xr-x
Free 13.24 GB of 57.97 GB (22.84%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     MonitorCommand.php (3.72 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace Illuminate\Queue\Console;

use 
Illuminate\Console\Command;
use 
Illuminate\Contracts\Events\Dispatcher;
use 
Illuminate\Contracts\Queue\Factory;
use 
Illuminate\Queue\Events\QueueBusy;
use 
Illuminate\Support\Collection;
use 
Symfony\Component\Console\Attribute\AsCommand;

#[
AsCommand(name'queue:monitor')]
class 
MonitorCommand extends Command
{
    
/**
     * The console command name.
     *
     * @var string
     */
    
protected $signature 'queue:monitor
                       {queues : The names of the queues to monitor}
                       {--max=1000 : The maximum number of jobs that can be on the queue before an event is dispatched}'
;

    
/**
     * The name of the console command.
     *
     * This name is used to identify the command during lazy loading.
     *
     * @var string|null
     *
     * @deprecated
     */
    
protected static $defaultName 'queue:monitor';

    
/**
     * The console command description.
     *
     * @var string
     */
    
protected $description 'Monitor the size of the specified queues';

    
/**
     * The queue manager instance.
     *
     * @var \Illuminate\Contracts\Queue\Factory
     */
    
protected $manager;

    
/**
     * The events dispatcher instance.
     *
     * @var \Illuminate\Contracts\Events\Dispatcher
     */
    
protected $events;

    
/**
     * The table headers for the command.
     *
     * @var string[]
     */
    
protected $headers = ['Connection''Queue''Size''Status'];

    
/**
     * Create a new queue listen command.
     *
     * @param  \Illuminate\Contracts\Queue\Factory  $manager
     * @param  \Illuminate\Contracts\Events\Dispatcher  $events
     * @return void
     */
    
public function __construct(Factory $managerDispatcher $events)
    {
        
parent::__construct();

        
$this->manager $manager;
        
$this->events $events;
    }

    
/**
     * Execute the console command.
     *
     * @return void
     */
    
public function handle()
    {
        
$queues $this->parseQueues($this->argument('queues'));

        
$this->displaySizes($queues);

        
$this->dispatchEvents($queues);
    }

    
/**
     * Parse the queues into an array of the connections and queues.
     *
     * @param  string  $queues
     * @return \Illuminate\Support\Collection
     */
    
protected function parseQueues($queues)
    {
        return 
collect(explode(','$queues))->map(function ($queue) {
            [
$connection$queue] = array_pad(explode(':'$queue2), 2null);

            if (! isset(
$queue)) {
                
$queue $connection;
                
$connection $this->laravel['config']['queue.default'];
            }

            return [
                
'connection' => $connection,
                
'queue' => $queue,
                
'size' => $size $this->manager->connection($connection)->size($queue),
                
'status' => $size >= $this->option('max') ? '<fg=red>ALERT</>' 'OK',
            ];
        });
    }

    
/**
     * Display the failed jobs in the console.
     *
     * @param  \Illuminate\Support\Collection  $queues
     * @return void
     */
    
protected function displaySizes(Collection $queues)
    {
        
$this->table($this->headers$queues);
    }

    
/**
     * Fire the monitoring events.
     *
     * @param  \Illuminate\Support\Collection  $queues
     * @return void
     */
    
protected function dispatchEvents(Collection $queues)
    {
        foreach (
$queues as $queue) {
            if (
$queue['status'] == 'OK') {
                continue;
            }

            
$this->events->dispatch(
                new 
QueueBusy(
                    
$queue['connection'],
                    
$queue['queue'],
                    
$queue['size'],
                )
            );
        }
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0057 ]--