Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/leafsphp/queue
Browse files Browse the repository at this point in the history
  • Loading branch information
mychidarko committed Sep 12, 2023
2 parents 3508cbe + c07b510 commit e25a391
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/Queue/Commands/QueueConfigCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ protected function handle()

if (file_exists($appConfigFile)) {
$this->error('Queue config already exists');

return 1;
}

if (!copy(__DIR__ . '/stubs/config.stub', $appConfigFile)) {
$this->error('Failed to generate queue config');

return 1;
}

Expand Down
5 changes: 4 additions & 1 deletion src/Queue/Commands/QueueInstallCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Aloe\Command;
use Aloe\Core;
use Leaf\Queue;

class QueueInstallCommand extends Command
{
Expand All @@ -31,11 +30,13 @@ protected function handle()

if (file_exists($migrationFile)) {
$this->error('Queue migration already exists');

return 1;
}

if (!copy(__DIR__ . '/stubs/migration.stub', $migrationFile)) {
$this->error('Failed to generate queue migration');

return 1;
}

Expand All @@ -44,10 +45,12 @@ protected function handle()

if (!\Aloe\Core::run('php leaf db:migrate -f jobs', $this->output)) {
$this->error('Failed to run queue migration');

return 1;
}

$this->info('Queue migration ran successfully');

return 0;
}
}

0 comments on commit e25a391

Please sign in to comment.