Give the redownload command a better name
This commit is contained in:
parent
c5e0b621a6
commit
f9fc24dd04
2 changed files with 3 additions and 3 deletions
47
app/Console/Commands/ReDownloadWebMentions.php
Normal file
47
app/Console/Commands/ReDownloadWebMentions.php
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Console\Commands;
|
||||||
|
|
||||||
|
use App\WebMention;
|
||||||
|
use Illuminate\Console\Command;
|
||||||
|
use App\Jobs\DownloadWebMention;
|
||||||
|
|
||||||
|
class ReDownloadWebMentions extends Command
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The name and signature of the console command.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $signature = 'webmentions:redownload';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The console command description.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $description = 'Redownload the HTML content of webmentions';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new command instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute the console command.
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function handle()
|
||||||
|
{
|
||||||
|
$webmentions = WebMention::all();
|
||||||
|
foreach ($webmentions as $webmention) {
|
||||||
|
$this->dispatch(new DownloadWebMention($webmention->source));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -15,7 +15,7 @@ class Kernel extends ConsoleKernel
|
||||||
protected $commands = [
|
protected $commands = [
|
||||||
Commands\SecurityCheck::class,
|
Commands\SecurityCheck::class,
|
||||||
Commands\ParseCachedWebMentions::class,
|
Commands\ParseCachedWebMentions::class,
|
||||||
Commands\DownloadWebMentions::class,
|
Commands\ReDownloadWebMentions::class,
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue