I am developing a web app where a user will has a list of jobs on his dashboard. These jobs run periodically on a queue, or can be triggered manually with a button. I have a 'Last Run' column. When the job is running I want to be able to change the value to 'Running'. When it finishes, i want to be able to broadcast a message to that user and update the Last Run date and time.
I am ok with the broadcast message. I need to get my head round how to update the job status value when it's running. (I'm not necessarily after code, just 'do this, then this then this' will be fine). Polling the database every few seconds for the status would be inefficient, so what alternatives are there?
Would it be a case of using Echo, listening for an event then change the value using vue?
I'm using Laravel 5.4 and Vue 2.0.