parent
b57edf05f4
commit
0641818c1e
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Models\ArtistQueue;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
class ProcessArtistQueue extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'app:process-artist-queue';
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Runs queue responsible for scraping artist pages for album data, then queuing the albums';
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
$records = ArtistQueue::where('state', 'in_progress')->get();
|
||||
foreach ($records as $record) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,14 +1,16 @@
|
||||
<?php
|
||||
|
||||
use App\Http\Controllers\ApiController;
|
||||
use App\Http\Controllers\SearchController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::get('/', function () {
|
||||
return view('pages.main');
|
||||
});
|
||||
|
||||
Route::get('/artist/{artist}', [SearchController::class, 'search_artist'])->name('api.search.artist');
|
||||
Route::get('/artist/{artist}', [ApiController::class, 'search_artist'])->name('api.search.artist');
|
||||
|
||||
// Get all artists
|
||||
Route::get('api/artists/', [ApiController::class, 'get_artists'])->name('api.artist');
|
||||
Route::get('api/artists/queue/{id}', [ApiController::class, 'queue_artist'])->name('api.artist.queue');
|
||||
|
||||
// Queue single artist
|
||||
Route::get('api/queue/artist/{id}', [ApiController::class, 'queue_artist'])->name('api.artist.queue');
|
||||
|
||||
Loading…
Reference in new issue