Throttle requests to database when checking task state

Signed-off-by: Kris Hicks <krishicks@gmail.com>