created a new job
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
40
app/Jobs/Commands/Eve/ItemPricesUpdateJob.php
Normal file
40
app/Jobs/Commands/Eve/ItemPricesUpdateJob.php
Normal 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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user