Enabled move and queue processing

This commit is contained in:
Deon George
2016-06-29 14:04:02 +10:00
parent 4c317a811c
commit 3361427c75
8 changed files with 201 additions and 92 deletions

View File

@@ -8,30 +8,32 @@ use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use App\Model\Photo;
use Artisan;
class PhotoMove extends Job implements ShouldQueue
{
use InteractsWithQueue, SerializesModels;
use InteractsWithQueue, SerializesModels;
private $photo;
private $photo;
/**
* Create a new job instance.
*
* @return void
*/
public function __construct(Photo $photo)
{
$this->photo = $photo;
}
/**
* Create a new job instance.
*
* @return void
*/
public function __construct(Photo $photo)
{
$this->photo = $photo;
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
Log::info('Moving: '.$this->photo->id);
}
/**
* Execute the job.
*
* @return void
*/
public function handle()
{
Log::info(__METHOD__.' Moving: '.$this->photo->id);
Artisan::call('photo:move',['--id' => $this->photo->id]);
}
}