created a new job

This commit is contained in:
2020-08-12 03:43:50 -05:00
parent 978a028553
commit 12b6f8b98c
2 changed files with 44 additions and 3 deletions

View File

@@ -9,6 +9,9 @@ use Log;
use Commands\Library\CommandHelper;
use App\Library\Moons\MoonCalc;
//Job
use App\Jobs\Eve\ItemPricesUpdateJob;
class ItemPricesUpdateCommand extends Command
{
/**
@@ -45,9 +48,7 @@ class ItemPricesUpdateCommand extends Command
$task = new CommandHelper('ItemPriceUpdate');
$task->SetStartStatus();
$moonHelper = new MoonCalc;
$moonHelper->FetchNewPrices();
ItemPricesUpdateJob::dispatch();
$task->SetStopStatus();
}

View File

@@ -0,0 +1,40 @@
<?php
namespace App\Jobs\Eve;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Log;
//Library
use App\Library\Moons\MoonCalc;
class ItemPricesUpdateJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
$moonHelper = new MoonCalc;
$moonHelper->FetchNewPrices();
}
}