Skip to content

Commit

Permalink
fix: mongodb client at startup (#178)
Browse files Browse the repository at this point in the history
* mongodb client at startup

* SIGNATURE_VALIDATION_ENABLED disabled on uat

* enable pr pipeline also for release branch
  • Loading branch information
manuraf committed Feb 23, 2024
1 parent 7b93dae commit d509442
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/pr_functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
pull_request:
branches:
- main
- releases/**
types:
- opened
- edited
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr_ms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
pull_request:
branches:
- main
- releases/**
types:
- opened
- edited
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
package it.pagopa.selfcare.onboarding.conf;

import io.quarkus.runtime.StartupEvent;
import it.pagopa.selfcare.azurestorage.AzureBlobClient;
import it.pagopa.selfcare.azurestorage.AzureBlobClientDefault;
import it.pagopa.selfcare.onboarding.entity.Onboarding;
import it.pagopa.selfcare.product.service.ProductService;
import it.pagopa.selfcare.product.service.ProductServiceCacheable;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.enterprise.event.Observes;
import lombok.extern.slf4j.Slf4j;
import org.eclipse.microprofile.config.inject.ConfigProperty;

@ApplicationScoped
@Slf4j
public class OnboardingMsConfig {

@ConfigProperty(name = "onboarding-ms.blob-storage.container-product")
Expand All @@ -19,6 +24,10 @@ public class OnboardingMsConfig {
@ConfigProperty(name = "onboarding-ms.blob-storage.connection-string-product")
String connectionStringProduct;

void onStart(@Observes StartupEvent ev) {
log.info(String.format("Database %s is starting...", Onboarding.mongoDatabase().getName()));
}

@ApplicationScoped
public ProductService productService(){
return new ProductServiceCacheable(connectionStringProduct, containerProduct, filepathProduct);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ app_settings = [
},
{
name = "SIGNATURE_VALIDATION_ENABLED"
value = "true"
value = "false"
},
{
name = "STORAGE_CONTAINER_CONTRACT"
Expand Down

0 comments on commit d509442

Please sign in to comment.