Fix caching determination for traffic import

This commit is contained in:
Deon George 2020-05-28 15:35:19 +10:00
parent 7d41fb857a
commit 7f1681f0b7
No known key found for this signature in database
GPG Key ID: 7670E8DC27415254
2 changed files with 4 additions and 3 deletions

View File

@ -33,7 +33,7 @@ abstract class Supplier
sleep($x);
}
$result = Cache::remember('Supplier:'.$this->o->id,86400,function() {
$result = Cache::remember('Supplier:'.$this->o->id.$this->o->stats_lastupdate,86400,function() {
$client = $this->getClient();
$result = $client->request('POST',null,[

View File

@ -5,6 +5,8 @@ namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
use App\Jobs\BroadbandTraffic;
class Kernel extends ConsoleKernel
{
/**
@ -24,8 +26,7 @@ class Kernel extends ConsoleKernel
*/
protected function schedule(Schedule $schedule)
{
// $schedule->command('inspire')
// ->hourly();
$schedule->job(new BroadbandTraffic())->dailyAt('10:00');
}
/**