Laravel-Queue-Monitor icon indicating copy to clipboard operation
Laravel-Queue-Monitor copied to clipboard

Feature/events dispatching available on Monitor model

Open alessandrofuda opened this issue 1 year ago • 5 comments

Hi, for my need I had to intercept some user action from the UI (relative to queue_monitor table, Monitor model). For example, when a user delete an item from UI, I have to implement some action in my application.

So I propose to manage Events fired by the Monitor model (on deleting and creating records).

So, developers can makes their Listeners, on application side, "hooking" to package's Events.

In short: make available 4 main Events we can use in our listeners in our application.

Let me know if might be useful, thanks

(in the pr , restore .gitignore and composer.json)

alessandrofuda avatar May 21 '24 15:05 alessandrofuda

Hey! Thanks for your contribution. The PR itself looks good but I'm currently debating if a custom Monitor class which can be overridden by the consuming application would be a good idea. Nonetheless, it looks like you have deleted the composer.json, I assume that was a mistake?

romanzipp avatar May 21 '24 15:05 romanzipp

it looks like you have deleted the composer.json, I assume that was a mistake?

Yes, sure is my fault :)

alessandrofuda avatar May 21 '24 16:05 alessandrofuda

it looks like you have deleted the composer.json, I assume that was a mistake?

Yes, sure is my fault :)

Restored composer.json and .gitignore

alessandrofuda avatar May 22 '24 07:05 alessandrofuda

I'm currently debating if a custom Monitor class which can be overridden by the consuming application would be a good idea.

Yes, for the moment I use my custom Monitor class via model value into config/queue-monitor.php. My custom model extends package Monitor model.

alessandrofuda avatar May 22 '24 09:05 alessandrofuda

+1

Oxicode avatar Feb 07 '25 21:02 Oxicode