I am new to redis and predis. I want to create a simple sign up form and want to send data to user email id. I have written the script for sign up and email sending. Now I want to make a queue in which i want to put both of the jobs. and as the user click on submit then processor should not wait for sending email. sending email should be put in a queue. and should be processed in background. please guys can anyone give me a reference of such script in php using redis.
I am new to redis and predis . I want to create a simple
Share
What you can do is, push the data to a redis list and pick data from the worker which is polling the list for any data and then send it by email.
Steps:
Make a new predis client
$redis = new Predis\Client("parameter");A predis list
$redis->lpush(listname, "Data");and finally a worker(Cron) which is taking data from the same list
Other work around way is to use pub/sub of redis.
Try redis here and documentation- redis commands
Predis examples. In examples folder.