mirror of
https://github.com/henrywhitaker3/Speedtest-Tracker.git
synced 2025-12-21 21:33:08 +01:00
Merge pull request #3 from henrywhitaker3/dev-v1
Fixed scheduling issue
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
namespace App\Console;
|
namespace App\Console;
|
||||||
|
|
||||||
use App\Helpers\SpeedtestHelper;
|
use App\Helpers\SpeedtestHelper;
|
||||||
|
use App\Jobs\SpeedtestJob;
|
||||||
use Illuminate\Console\Scheduling\Schedule;
|
use Illuminate\Console\Scheduling\Schedule;
|
||||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||||
|
|
||||||
@@ -26,8 +27,8 @@ class Kernel extends ConsoleKernel
|
|||||||
protected function schedule(Schedule $schedule)
|
protected function schedule(Schedule $schedule)
|
||||||
{
|
{
|
||||||
$schedule->call(function() {
|
$schedule->call(function() {
|
||||||
SpeedtestHelper::runSpeedtest();
|
SpeedtestJob::dispatch();
|
||||||
})->hourly();
|
})->hourlyAt(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -120,8 +120,8 @@ export default class HistoryGraph extends Component {
|
|||||||
duData.datasets[0].data.push(download);
|
duData.datasets[0].data.push(download);
|
||||||
duData.datasets[1].data.push(upload);
|
duData.datasets[1].data.push(upload);
|
||||||
pingData.datasets[0].data.push(ping);
|
pingData.datasets[0].data.push(ping);
|
||||||
duData.labels.push(new Date(e.created_at).toLocaleDateString());
|
duData.labels.push(new Date(e.created_at).toLocaleString());
|
||||||
pingData.labels.push(new Date(e.created_at).toLocaleDateString());
|
pingData.labels.push(new Date(e.created_at).toLocaleString());
|
||||||
});
|
});
|
||||||
|
|
||||||
this.setState({
|
this.setState({
|
||||||
|
|||||||
Reference in New Issue
Block a user