I have a task to provide users a status of a backend process that runs in our application. To display this status we have created a Status table in the database that lists the tasks that have completed, failed, or are in progress, like so:
To get the most current status of this table, I am calling an .ajax()
method every 3 seconds by wrapping the call within a setInterval()
method. The refresh works as expected and grabs the most current status of the program, however this was my first approach at the issue and feels a little brute force-ish. I'm wondering if a better way to accomplish this exists (i.e., a cross-browser solution that mimics a live news feed with it's own API). Any thoughts?