Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PN-11808] fix env and added log #1079

Merged
merged 3 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/aws/cfn/microservice-dev-cfg.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,6 @@
"FutureActionTtlExtraDays": "10",
"AttemptTimeoutSec": "7",
"NumRetry": "3",
"isAdditionalLangsEnabled": "true"
"AdditionalLangsEnabled": "true"
}
}
10 changes: 5 additions & 5 deletions scripts/aws/cfn/microservice.yml
Original file line number Diff line number Diff line change
Expand Up @@ -875,13 +875,13 @@ Parameters:
Description: 'Number of retries for each idempotent versioning lambda'
Default: 3

isAdditionalLangsEnabled:
AdditionalLangsEnabled:
Type: String
Description: 'Enable additional languages feature'
Default: 'false'
Default: false
AllowedValues:
- "true"
- "false"
- true
- false


Conditions:
Expand Down Expand Up @@ -999,7 +999,7 @@ Resources:
ContainerEnvEntry79: !Sub 'PN_DELIVERYPUSH_PERFORMANCEIMPROVEMENTENDDATE=${PerformanceImprovementEndDate}'
ContainerEnvEntry80: !Sub 'PN_DELIVERYPUSH_TOPICS_DELIVERYVALIDATIONEVENTS=${DeliveryPushValidationInputsQueueName}'
ContainerEnvEntry81: !Sub 'PN_DELIVERYPUSH_WEBHOOK_MAXSTREAMS=${WebhookMaxStreams}'
ContainerEnvEntry82: !Sub 'PN_DELIVERYPUSH_ISADDITIONALLANGSENABLED=${isAdditionalLangsEnabled}'
ContainerEnvEntry82: !Sub 'PN_DELIVERYPUSH_ADDITIONALLANGSENABLED=${AdditionalLangsEnabled}'
ContainerSecret1: !Sub 'PN_DELIVERYPUSH_ADDRESSMANAGERAPIKEY=arn:aws:secretsmanager:${AWS::Region}:${AWS::AccountId}:secret:pn-DeliveryPush-Secrets:AddressManagerApiKey:AWSCURRENT:'
MicroServiceSecretPrefix: pn-DeliveryPush-Secrets
JavaToolOptions: '-Dreactor.netty.ioWorkerCount=50'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public class PnDeliveryPushConfigs {

private String performanceImprovementEndDate;

public boolean isAdditionalLangsEnabled;
private boolean additionalLangsEnabled;

@Data
public static class Topics {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public class DocumentComposition {

public static TemplateType retrieveTemplateFromLang(TemplateType templateType, String additionalLang) {
String finalTemplateName = templateType.name() + "_" + additionalLang;
log.info("Retrieve template [{}] from lang: [{}]", finalTemplateName, additionalLang);
return DocumentComposition.TemplateType.valueOf(finalTemplateName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ private DocumentComposition.TemplateType retrieveTemplateFromLang(DocumentCompos
if(!pnDeliveryPushConfigs.isAdditionalLangsEnabled()
|| checkIfRequiredItalianTemplate(additionalLanguages)
|| AAR_NOTIFICATION_RADD.equals(italianTemplateType)){
log.info("retrieve italian template for {}", italianTemplateType);
return italianTemplateType;
}
return additionalLanguages.stream()
Expand Down