How to create common event listener for all my events
I'm developing the new application in lumen. In my case buyer will post their request and it will be valid for 5min(based on admin settings). So like this many orders will be posted by buyers. So I have to update buyer request details in db table and then I have to send queue to notify sellers based on the location of buyer. I have completed this notification sending by a queue. Now I need to change the status of the buy request after 5 min from process to timeout.(1->2). How to do this in lumen events or queue. If i queue the job after 5 min means how to update the eloquent model from jobs class. Anyone, please give me the solution. N number of buyers will post the data, so from job create time I have to update status after 5min.
a simple (ish) solution (at least to me) is to create a console command that runs every second.
this will look at the buyer request (Hopefully there is a start time or whatever you have called it) and if that time > curtime().. you change it to timeout..
have you got access to cron jobs/scheduler if not then I am afraid you are going to have to move to a VPS.. (Digital OCEAN costs only 5£.. so its probably same price as your shared hosting)
but wait you are using queue on shared hosting anyway.. so why is cronjob/scheduler a problem?
I'm having an issue with the queue on shared hosting. I have run the queue on ssh only. It getting terminate after some time from when I start the queue. I don't have much idea on run these type of service on SSH or cron. Could you please assist me to do this.