0

I am using measures.get_component_with_specified_measures to connect to the relevant endpoint to get the metrics of a project, using the Sonarqube web client module in Python (https://python-sonarqube-api.readthedocs.io/en/latest/examples/measures.html)

Thing is, I am doing this right after I run a scan, and for bigger projects, this can take some time.

So for those projects, my script then fails and gives an error.

I could implement a time.sleep() method to pause execution of the script for a while, but this is not needed for smaller code scans. I have implemented a check condition on the response I get from the API, but I was wondering if there is any way I can check from the API itself if the analysis and background tasks have been completed or not?

0 Answers0