Skip to content

Commit

Permalink
Make commands lazy
Browse files Browse the repository at this point in the history
  • Loading branch information
timacdonald committed Mar 18, 2024
1 parent 7dc7c05 commit f543793
Show file tree
Hide file tree
Showing 18 changed files with 36 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Console/ClearCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
namespace Laravel\Horizon\Console;

use Illuminate\Console\Command;
use Symfony\Component\Console\Attribute\AsCommand;
use Illuminate\Console\ConfirmableTrait;
use Illuminate\Queue\QueueManager;
use Illuminate\Support\Arr;
use Laravel\Horizon\Contracts\JobRepository;
use Laravel\Horizon\RedisQueue;

#[AsCommand(name: 'horizon:clear')
class ClearCommand extends Command
{
use ConfirmableTrait;
Expand Down
2 changes: 2 additions & 0 deletions src/Console/ClearMetricsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
namespace Laravel\Horizon\Console;

use Illuminate\Console\Command;
use Symfony\Component\Console\Attribute\AsCommand;
use Laravel\Horizon\Contracts\MetricsRepository;

#[AsCommand(name: 'horizon:clear-metrics')
class ClearMetricsCommand extends Command
{
/**
Expand Down
2 changes: 2 additions & 0 deletions src/Console/ContinueCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
use Illuminate\Support\Str;
use Laravel\Horizon\Contracts\MasterSupervisorRepository;
use Laravel\Horizon\MasterSupervisor;
use Symfony\Component\Console\Attribute\AsCommand;

#[AsCommand(name: 'horizon:continue')
class ContinueCommand extends Command
{
/**
Expand Down
2 changes: 2 additions & 0 deletions src/Console/ContinueSupervisorCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
use Illuminate\Support\Str;
use Laravel\Horizon\Contracts\SupervisorRepository;
use Laravel\Horizon\MasterSupervisor;
use Symfony\Component\Console\Attribute\AsCommand;

#[AsCommand(name: 'horizon:continue-supervisor')
class ContinueSupervisorCommand extends Command
{
/**
Expand Down
2 changes: 2 additions & 0 deletions src/Console/ForgetFailedCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
namespace Laravel\Horizon\Console;

use Illuminate\Console\Command;
use Symfony\Component\Console\Attribute\AsCommand;
use Laravel\Horizon\Contracts\JobRepository;

#[AsCommand(name: 'horizon:forget')
class ForgetFailedCommand extends Command
{
/**
Expand Down
2 changes: 2 additions & 0 deletions src/Console/HorizonCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
namespace Laravel\Horizon\Console;

use Illuminate\Console\Command;
use Symfony\Component\Console\Attribute\AsCommand;
use Laravel\Horizon\Contracts\MasterSupervisorRepository;
use Laravel\Horizon\MasterSupervisor;
use Laravel\Horizon\ProvisioningPlan;

#[AsCommand(name: 'horizon')
class HorizonCommand extends Command
{
/**
Expand Down
2 changes: 2 additions & 0 deletions src/Console/InstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
use Illuminate\Console\Command;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Str;
use Symfony\Component\Console\Attribute\AsCommand;

#[AsCommand(name: 'horizon:install')
class InstallCommand extends Command
{
/**
Expand Down
2 changes: 2 additions & 0 deletions src/Console/ListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
namespace Laravel\Horizon\Console;

use Illuminate\Console\Command;
use Symfony\Component\Console\Attribute\AsCommand;
use Laravel\Horizon\Contracts\MasterSupervisorRepository;

#[AsCommand(name: 'horizon:list')
class ListCommand extends Command
{
/**
Expand Down
2 changes: 2 additions & 0 deletions src/Console/PauseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
use Illuminate\Support\Str;
use Laravel\Horizon\Contracts\MasterSupervisorRepository;
use Laravel\Horizon\MasterSupervisor;
use Symfony\Component\Console\Attribute\AsCommand;

#[AsCommand(name: 'horizon:pause')
class PauseCommand extends Command
{
/**
Expand Down
2 changes: 2 additions & 0 deletions src/Console/PauseSupervisorCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
namespace Laravel\Horizon\Console;

use Illuminate\Console\Command;
use Symfony\Component\Console\Attribute\AsCommand;
use Illuminate\Support\Str;
use Laravel\Horizon\Contracts\SupervisorRepository;
use Laravel\Horizon\MasterSupervisor;

#[AsCommand(name: 'horizon:pause-supervisor')
class PauseSupervisorCommand extends Command
{
/**
Expand Down
2 changes: 2 additions & 0 deletions src/Console/PublishCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
namespace Laravel\Horizon\Console;

use Illuminate\Console\Command;
use Symfony\Component\Console\Attribute\AsCommand;

#[AsCommand(name: 'horizon:publish')
class PublishCommand extends Command
{
/**
Expand Down
2 changes: 2 additions & 0 deletions src/Console/PurgeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
namespace Laravel\Horizon\Console;

use Illuminate\Console\Command;
use Symfony\Component\Console\Attribute\AsCommand;
use Illuminate\Support\Str;
use Laravel\Horizon\Contracts\MasterSupervisorRepository;
use Laravel\Horizon\Contracts\ProcessRepository;
use Laravel\Horizon\Contracts\SupervisorRepository;
use Laravel\Horizon\MasterSupervisor;
use Laravel\Horizon\ProcessInspector;

#[AsCommand(name: 'horizon:purge')
class PurgeCommand extends Command
{
/**
Expand Down
2 changes: 2 additions & 0 deletions src/Console/SnapshotCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
use Illuminate\Console\Command;
use Laravel\Horizon\Contracts\MetricsRepository;
use Laravel\Horizon\Lock;
use Symfony\Component\Console\Attribute\AsCommand;

#[AsCommand(name: 'horizon:snapshot')
class SnapshotCommand extends Command
{
/**
Expand Down
2 changes: 2 additions & 0 deletions src/Console/StatusCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
namespace Laravel\Horizon\Console;

use Illuminate\Console\Command;
use Symfony\Component\Console\Attribute\AsCommand;
use Laravel\Horizon\Contracts\MasterSupervisorRepository;

#[AsCommand(name: 'horizon:status')
class StatusCommand extends Command
{
/**
Expand Down
2 changes: 2 additions & 0 deletions src/Console/SupervisorCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
use Illuminate\Console\Command;
use Laravel\Horizon\SupervisorFactory;
use Laravel\Horizon\SupervisorOptions;
use Symfony\Component\Console\Attribute\AsCommand;

#[AsCommand(name: 'horizon:supervisor')
class SupervisorCommand extends Command
{
/**
Expand Down
2 changes: 2 additions & 0 deletions src/Console/SupervisorsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

use Illuminate\Console\Command;
use Laravel\Horizon\Contracts\SupervisorRepository;
use Symfony\Component\Console\Attribute\AsCommand;

#[AsCommand(name: 'horizon:supervisors')
class SupervisorsCommand extends Command
{
/**
Expand Down
2 changes: 2 additions & 0 deletions src/Console/TerminateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
namespace Laravel\Horizon\Console;

use Illuminate\Console\Command;
use Symfony\Component\Console\Attribute\AsCommand;
use Illuminate\Contracts\Cache\Factory as CacheFactory;
use Illuminate\Support\Arr;
use Illuminate\Support\InteractsWithTime;
use Illuminate\Support\Str;
use Laravel\Horizon\Contracts\MasterSupervisorRepository;
use Laravel\Horizon\MasterSupervisor;

#[AsCommand(name: 'horizon:terminate')
class TerminateCommand extends Command
{
use InteractsWithTime;
Expand Down
2 changes: 2 additions & 0 deletions src/Console/TimeoutCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
use Illuminate\Console\Command;
use Laravel\Horizon\MasterSupervisor;
use Laravel\Horizon\ProvisioningPlan;
use Symfony\Component\Console\Attribute\AsCommand;

#[AsCommand(name: 'horizon:timeout')
class TimeoutCommand extends Command
{
/**
Expand Down

0 comments on commit f543793

Please sign in to comment.