-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
APP_ENV=local | ||
APP_KEY= | ||
APP_DEBUG=true | ||
APP_LOG_LEVEL=debug | ||
APP_URL=http://localhost | ||
|
||
DB_CONNECTION=mysql | ||
DB_HOST=127.0.0.1 | ||
DB_PORT=3306 | ||
DB_DATABASE=homestead | ||
DB_USERNAME=homestead | ||
DB_PASSWORD=secret | ||
|
||
BROADCAST_DRIVER=log | ||
CACHE_DRIVER=file | ||
SESSION_DRIVER=file | ||
QUEUE_DRIVER=sync | ||
|
||
REDIS_HOST=127.0.0.1 | ||
REDIS_PASSWORD=null | ||
REDIS_PORT=6379 | ||
|
||
MAIL_DRIVER=smtp | ||
MAIL_HOST=mailtrap.io | ||
MAIL_PORT=2525 | ||
MAIL_USERNAME=null | ||
MAIL_PASSWORD=null | ||
MAIL_ENCRYPTION=null | ||
|
||
PUSHER_APP_ID= | ||
PUSHER_KEY= | ||
PUSHER_SECRET= |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
vendor/ | ||
node_modules/ | ||
npm-debug.log | ||
|
||
# Laravel 4 specific | ||
bootstrap/compiled.php | ||
app/storage/ | ||
|
||
# Laravel 5 & Lumen specific | ||
public/storage | ||
public/hot | ||
storage/*.key | ||
.env.*.php | ||
.env.php | ||
.env | ||
Homestead.yaml | ||
Homestead.json | ||
|
||
# Rocketeer PHP task runner and deployment package. https://github.com/rocketeers/rocketeer | ||
.rocketeer/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?php | ||
|
||
namespace App\Console; | ||
|
||
use App\Helpers\ScheduledTasks; | ||
use App\Http\Controllers\ReportController; | ||
use App\Http\Controllers\TemperatureController; | ||
use Illuminate\Console\Scheduling\Schedule; | ||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel; | ||
use App\Http\Controllers\AlertController; | ||
|
||
class Kernel extends ConsoleKernel | ||
{ | ||
/** | ||
* The Artisan commands provided by your application. | ||
* | ||
* @var array | ||
*/ | ||
protected $commands = [ | ||
|
||
// | ||
]; | ||
|
||
/** | ||
* Define the application's command schedule. | ||
* | ||
* @param \Illuminate\Console\Scheduling\Schedule $schedule | ||
* @return void | ||
*/ | ||
protected function schedule(Schedule $schedule) | ||
{ | ||
|
||
// $schedule->command('inspire') | ||
// ->hourly(); | ||
|
||
|
||
//schedule for alarm | ||
$schedule->call(function(){ | ||
ScheduledTasks::detectAlarms(); | ||
})->dailyAt('09:00')->name('detect_alarms')->withoutOverlapping(); | ||
|
||
|
||
|
||
//schedule for auto reporting mechanism | ||
$schedule->call(function(){ | ||
ReportController::performPeriodicReport(); | ||
})->dailyAt('08:00')->name('process_reports')->withoutOverlapping(); | ||
|
||
//schedule for temperature data | ||
$schedule->call(function(){ | ||
TemperatureController::traverseAirports(); | ||
})->dailyAt('01:00'); | ||
} | ||
|
||
/** | ||
* Register the Closure based commands for the application. | ||
* | ||
* @return void | ||
*/ | ||
protected function commands() | ||
{ | ||
require base_path('routes/console.php'); | ||
} | ||
} |