I have a plugin that starts a task and subtasks from a CP widget AJAX call. The tasks are running without a hitch, but for some reason on production, the icon does not appear when the tasks start running unless I refresh the page.
On my local dev site (MAMP), the task icon appears as soon as the code below is called.
I am using this code to start the pending tasks I created:
Craft.cp.runPendingTasks();
Any ideas? Is there a different JS command I should be using?