The horizon dashboard would probably a lot lighter if there it could be configured to listen for broadcasted events rather than polling constantly for new data. This should probably be a configurable option, defaulting to polling (since not every application has websockets set up). AFAICT, this should be reasonably easy to implement using https://laravel.com/docs/5.5/broadcasting
That's... actually not a bad idea. I'll mark this as a feature request. We can definitely check in on that at some point I think.
And now that https://github.com/beyondcode/laravel-websockets has been release... ! :)
The idea is good, but since broadcasting uses queues... won't that make for an endless loop?
Ahahaha that's an interesting thought!
I think we could avoid that by instead pushing scheduled bundled updates every x seconds instead of pushing on every job completion. That would be way too many websockets events on production systems, most likely. Or instead, just request an update over websockets every x seconds, i.e. still polling, but doing so over the same connection which is much lighter.
Although I like this idea I think this would require quite a bit of work in order to pull this off properly. That's why we won't be working on this ourselves. If anyone can send in a clean PR for this we could consider it.
Most helpful comment
And now that https://github.com/beyondcode/laravel-websockets has been release... ! :)