Created
March 29, 2022 14:16
-
-
Save MahdiKarimipour/086ad925cd4c42b6201db9e459052087 to your computer and use it in GitHub Desktop.
Pellerex Foundation, Azure DevOps, Keep Fetching Project List
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int retries = 0; | |
| while (true) | |
| { | |
| if (retries > 10) | |
| { | |
| return (null, EngineeringOpsConstants.ErrorCodes.GenericError); | |
| } | |
| Thread.Sleep(2000); | |
| projectList = await GetProjects(project.Organisation); | |
| var createdProject = projectList.FirstOrDefault(p => p.Name == project.Name); | |
| if (createdProject.IsEmpty()) | |
| { | |
| retries++; | |
| continue; | |
| } | |
| return (createdProject, string.Empty); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment