IDP/QM Query Loop Thread