Skip to content

Commit

Permalink
Making it noncps again and using Thread.sleep instead
Browse files Browse the repository at this point in the history
  • Loading branch information
jafarre-bi committed Sep 2, 2024
1 parent db09f68 commit ecdcbdc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/org/ods/orchestration/usecase/DocGenUseCase.groovy
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.ods.orchestration.usecase

import com.cloudbees.groovy.cps.NonCPS
import groovy.json.JsonOutput

import org.ods.orchestration.service.DocGenService
Expand Down Expand Up @@ -250,6 +251,7 @@ abstract class DocGenUseCase {

abstract boolean shouldCreateArtifact (String documentType, Map repo)

@NonCPS
protected void checkServiceReadiness() {
int status
for (int i = 0; i < MAX_RETRIES; i++) {
Expand All @@ -264,7 +266,7 @@ abstract class DocGenUseCase {
// Given the lack of documentation about the possible exceptions, we have to consider all of them
// as retryable. Anyway, we have a MAX_RETRIES.
}
sleep(RETRY_WAIT_SECONDS)
Thread.sleep(RETRY_WAIT_SECONDS)
}
throw new ServiceNotReadyException(status, "DocGen service is not ready.")
}
Expand Down

0 comments on commit ecdcbdc

Please sign in to comment.