Fix polling on restart for running tasks.
Merge pull request #882 from arjclark/fix.poll_running_on_restart

Fix polling on restart for running tasks.