lundi 3 octobre 2016

How to use Dusterio in Laravel 5.3 for Amazon SQS

I have followed instruction from this link : http://ift.tt/1ZlNfwG

I have installed the dusterio package : enter image description here

And also I have successffully seeen the it's routes on my local console. Then I created a queue in my job directory :

public function handle()
{
    Mail::send('astronaut.email', ['test' => 'testContenet'], function ($message) {
        $message->subject("Astronaut Test Dusterio");

        $message->from('hisoka@astrnt.co', "ASTRNT BOT");

        $message->to($this->email);

    });
}

Then I call this queue from my controller like this :

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Jobs\testQueue;
use App\Http\Requests;

class dusterioController extends Controller
{
    public function testQueue()
    {
        $email = 'hyosoka187@gmail.com';
        $this->dispatch(new testQueue($email));

        return redirect()->back();
    }
}

Then I create a new route :

Route::get('dusteriosTestQueue',[
    'uses' => 'dusterioController@testQueue'
    ]);

So until now, When I call this route, I have successfully push my job to Amazon sqs db as shown below : enter image description here

So until this state, how do I use dusterio to execute my queue on amazon sqs...??? Thanks a lot



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire