Commit b57573a7 by Phạm Văn Đoan

cập nhật task từ NCT

parent 49f2074b
......@@ -60,7 +60,6 @@ class NctCrawlerTrackCommand extends Command
$tracks = $this->trackRepository->processNctGetTrackInfoFromTop100($url);
$tracks_playlist = $this->trackRepository->processNctGetTrackInfoFromTop100Playlist($url_playlist_top100);
//print_r($tracks); return false;
if (count($tracks) == 0) return false;
......
<?php
namespace App\Console\Commands\Nct;
namespace App\Console\Commands\NhacVn;
use App\Repositories\TrackRepository;
use Illuminate\Console\Command;
class NctCrawlerUpdateTrackLinkCommand extends Command
class NhacVnCrawlerTrackCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'nct:update-track-link';
protected $signature = 'nhacvn:get-track';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Cập nhật link bài hát từ NCT';
protected $description = 'Lấy bài hát từ Nhạc VN';
protected $trackRepository;
......
......@@ -4,6 +4,7 @@ namespace App\Console;
use App\Console\Commands\CrontjobCommand;
use App\Console\Commands\Nct\NctCrawlerTrackCommand;
use App\Console\Commands\NhacVn\NhacVnCrawlerTrackCommand;
use App\Console\Commands\Zing\ZingCrawlerNewRealeaseCommand;
use App\Console\Commands\Zing\ZingCrawlerTrackCommand;
use App\Console\Commands\CrawlerTrackImageCommand;
......@@ -23,6 +24,7 @@ class Kernel extends ConsoleKernel
ZingCrawlerNewRealeaseCommand::class,
CrawlerTrackImageCommand::class,
NctCrawlerTrackCommand::class,
NhacVnCrawlerTrackCommand::class,
];
......@@ -42,8 +44,11 @@ class Kernel extends ConsoleKernel
$schedule->command('zing:get-track')->everyThirtyMinutes();
$schedule->command('zing:get-new-release-track')->hourlyAt(10);
$schedule->command('crawler:get-track-image')->hourlyAt(15);
$schedule->command('nct:get-track')->hourlyAt(30);
$schedule->command('queue:work --once --timeout=120')->everyMinute()->withoutOverlapping();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment