7 months ago

Laravel queue should wait till the next job

Posted 7 months ago by Pixelairport

Hi. I test my application with terminal and tinker. My job creates a db entry in a table called "track" if it is finished. It also checks at the beginning if there is a entry to avoid doing the same thing more than once in a set period. The problem i have is, that when I start the worker and push the dispatch event multiple times in a very short time, the job is done more than one time and I have 3 or 4 entries in track table, because it is done often. So it seems the jobs running parallel. Is there a workaround for this?

In my example i send an notification email to user with the number how many private messages he has. So the email should only be send every 14 days.

Please sign in or create an account to participate in this conversation.