In my api I am using Redis for caching dispatched jobs from my controllers: This is how my controller looks
class FormSubmissionsController extends Controller
{
/**
* @param StoreRequest $request
* @return \Illuminate\Http\JsonResponse
*/
public function store(StoreRequest $request, FormSubmission $formSubmission)
{
JobStore::dispatch($formSubmission, $request->get('tracking_code'), $request->get('form'));
return response()->json([
'id' => $formSubmission->id
]);
}
}
All is working, and the only change I did to use redis
it was some config vars in dot env
file. My question:
In another controller I want to use some of Amazon SQS
services for queued jobs, any idea how to config queue and how should I dispatch each job to particular queue handler ?