Background task statuses

Hi,

I am building trying to get the Quality Gate status using the Web API. I want the status from a new scan that I pushed to the SonarQube server using sonar-scanner.

Looking at the Web API I can use the api/ce/task, get the analysisId and using that check qualitygates/project_status.

This works fine as long as the background task has completed, if it is “IN_PROGRESS” i sleep and then try again.

Is there any more thorough documentation somewhere that lists the different statuses for a background task?

  • SonarQube 6.7
  • sonar-scanner 4.0.0.1744
  • python 3.7.5 (requests 2.22.0)

(edit: I tried searching but couldn’t find anything).

Welcome to the community !

background tasks can be

  • PENDING
  • IN_PROGRESS
  • SUCCESS
  • FAILED
  • CANCELED

Theses values are coming from the protobuf contract here

1 Like

Thank you for welcoming me and thank you for the answer!