Skip to content

Commit

Permalink
[chore] Changed retry env values
Browse files Browse the repository at this point in the history
  • Loading branch information
svariant committed Nov 8, 2023
1 parent 372057a commit cc6609a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ then replace env variables with correct values
| `PDV_TOKENIZER_FIND_PII_ENDPOINT` | PDV Tokenizer API find pii endpoint | "/tokens/%s/pii" |
| `PDV_TOKENIZER_CREATE_TOKEN_ENDPOINT` | PDV Tokenizer API create token endpoint | "/tokens" |
| `PDV_TOKENIZER_SUBSCRIPTION_KEY` | API azure ocp apim subscription key | |
| `PDV_TOKENIZER_INITIAL_INTERVAL` | PDV Tokenizer initial interval for retry a request that fail with 429 status code | 1000 |
| `PDV_TOKENIZER_INITIAL_INTERVAL` | PDV Tokenizer initial interval for retry a request that fail with 429 status code | 200 |
| `PDV_TOKENIZER_MULTIPLIER` | PDV Tokenizer interval multiplier for subsequent request retry | 2.0 |
| `PDV_TOKENIZER_RANDOMIZATION_FACTOR` | PDV Tokenizer randomization factor for interval retry calculation | 0.6 |
| `PDV_TOKENIZER_MAX_RETRIES` | PDV Tokenizer max request retry | 4 |
| `PDV_TOKENIZER_MAX_RETRIES` | PDV Tokenizer max request retry | 3 |
| `TOKENIZER_APIM_HEADER_KEY` | Tokenizer APIM header key | x-api-key |

> to doc details about AZ fn config
Expand Down
4 changes: 2 additions & 2 deletions helm/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ microservice-chart:
COSMOS_RECEIPT_DB_NAME: "db"
COSMOS_RECEIPT_CONTAINER_NAME: "receipts"
PDV_TOKENIZER_BASE_PATH: "https://api.uat.tokenizer.pdv.pagopa.it/tokenizer/v1"
PDV_TOKENIZER_INITIAL_INTERVAL: "1000"
PDV_TOKENIZER_INITIAL_INTERVAL: "200"
PDV_TOKENIZER_MULTIPLIER: "2.0"
PDV_TOKENIZER_RANDOMIZATION_FACTOR: "0.6"
PDV_TOKENIZER_MAX_RETRIES: "4"
PDV_TOKENIZER_MAX_RETRIES: "3"
ENABLE_ECS_CONSOLE: "true"
CONSOLE_LOG_THRESHOLD: "DEBUG"
CONSOLE_LOG_PATTERN: "%d{HH:mm:ss.SSS}[%thread]%-5level%logger{36}-%msg%n"
Expand Down
4 changes: 2 additions & 2 deletions helm/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ microservice-chart:
COSMOS_RECEIPT_DB_NAME: "db"
COSMOS_RECEIPT_CONTAINER_NAME: "receipts"
PDV_TOKENIZER_BASE_PATH: "https://api.tokenizer.pdv.pagopa.it"
PDV_TOKENIZER_INITIAL_INTERVAL: "1000"
PDV_TOKENIZER_INITIAL_INTERVAL: "200"
PDV_TOKENIZER_MULTIPLIER: "2.0"
PDV_TOKENIZER_RANDOMIZATION_FACTOR: "0.6"
PDV_TOKENIZER_MAX_RETRIES: "4"
PDV_TOKENIZER_MAX_RETRIES: "3"
ENABLE_ECS_CONSOLE: "true"
CONSOLE_LOG_THRESHOLD: "DEBUG"
CONSOLE_LOG_PATTERN: "%d{HH:mm:ss.SSS}[%thread]%-5level%logger{36}-%msg%n"
Expand Down
4 changes: 2 additions & 2 deletions helm/values-uat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ microservice-chart:
COSMOS_RECEIPT_DB_NAME: "db"
COSMOS_RECEIPT_CONTAINER_NAME: "receipts"
PDV_TOKENIZER_BASE_PATH: "https://api.uat.tokenizer.pdv.pagopa.it/tokenizer/v1"
PDV_TOKENIZER_INITIAL_INTERVAL: "1000"
PDV_TOKENIZER_INITIAL_INTERVAL: "200"
PDV_TOKENIZER_MULTIPLIER: "2.0"
PDV_TOKENIZER_RANDOMIZATION_FACTOR: "0.6"
PDV_TOKENIZER_MAX_RETRIES: "4"
PDV_TOKENIZER_MAX_RETRIES: "3"
ENABLE_ECS_CONSOLE: "true"
CONSOLE_LOG_THRESHOLD: "DEBUG"
CONSOLE_LOG_PATTERN: "%d{HH:mm:ss.SSS}[%thread]%-5level%logger{36}-%msg%n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
*/
public class PDVTokenizerServiceRetryWrapperImpl implements PDVTokenizerServiceRetryWrapper {

private static final Long INITIAL_INTERVAL = Long.parseLong(System.getenv().getOrDefault("PDV_TOKENIZER_INITIAL_INTERVAL", "1000"));
private static final Long INITIAL_INTERVAL = Long.parseLong(System.getenv().getOrDefault("PDV_TOKENIZER_INITIAL_INTERVAL", "200"));
private static final Double MULTIPLIER = Double.parseDouble(System.getenv().getOrDefault("PDV_TOKENIZER_MULTIPLIER", "2.0"));
private static final Double RANDOMIZATION_FACTOR = Double.parseDouble(System.getenv().getOrDefault("PDV_TOKENIZER_RANDOMIZATION_FACTOR", "0.6"));
private static final Integer MAX_RETRIES = Integer.parseInt(System.getenv().getOrDefault("PDV_TOKENIZER_MAX_RETRIES", "4"));
private static final Integer MAX_RETRIES = Integer.parseInt(System.getenv().getOrDefault("PDV_TOKENIZER_MAX_RETRIES", "3"));

private final PDVTokenizerService pdvTokenizerService;
private final Retry retry;
Expand Down

0 comments on commit cc6609a

Please sign in to comment.