I need to trigger some code when new items are added to Drupal's queue system. My question, how to do that? How to capture that event?
I have created a custom views bulk operation which enqueues items into Drupal's queue system for further processing. Usually, the enqueued jobs would run when Cron runs. I need to execute a function when new items are added to the queue by VBO. I could query the database every minute to check for new items, but I hope it is possible to listen to that insertion event using a rule or a hook.