Check for thread interruption while checking index.

This enables clean shutdown of IndexerServlet while checking job runs.