Firing a command when a queue is finished?

Posted 3 years ago by alexleonard

Every night I'm going to be importing a large dataset into my application and we're doing a certain amount of pre-caching of different search queries on the dataset.

Each dataset record import is queued and when the queue is finished I need to clear a certain set of cache tags. I was searching through the queue/event/scheduling docs for 5.1 but wasn't seeing any obvious way to trigger something when a specific queue is emptied.

I could pass a 'last-record' => true flag into the queued record creation which triggers the cache tag clearing, but thought I'd check if there was some inbuilt thing I was missing :)

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

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.