I'm trying to make a sort of real time auction site with each auction ideally lasting only as long as people are bidding. If no new bids are detected within a few seconds of the last bid, then the auction will close. Originally, I did this by having an event fire off when someone bids that sleeps for a few seconds and then checks if there are any new bids when it finally runs. It worked but then I realized that the event queue would get clogged by all of these inactivity checker events.
Is there a way to remove specific events from the queue? Or some other better way to do this? Thanks.
So the job will be actually executed by queue worker after 5 minutes (300 seconds). But you should know this is not guaranteed and the job may be run later, it depends on number of workers and number of jobs in a queue. This may be critical to your app.