Has there any better way to capture clientquery status when its done .
I have to put the sleep for 2 or 3min to get the query to be finish. the number of servers in the group can be varies from 200-600 per group.
bigfix_URL_client_query=“https://abc:52311/api/clientquery”
req_bes_splunkfwd_log=requests.post(bigfix_URL_client_query,verify=False,auth=(bigfix_username,bigfix_pwd),data=xml_query)
tree2 = ET.fromstring(req_bes_splunkfwd_log.text)
query_ID=“”
for fixlet in tree2.findall(‘.//ClientQuery’):
query_ID=fixlet.find(“ID”).text
bigfix_URL_client_query_res=“https://abc:52311/api/clientqueryresults”
bigfix_URL_query_res=bigfix_URL_client_query_res+“/”+query_ID
print("Sleeping for "+str(query_sleep_time)+“sec to let the LOG Query to finish:” )
time.sleep(query_sleep_time) ---->. sleep for 120sec