mirror of
https://github.com/google/nomulus.git
synced 2025-05-30 01:10:14 +02:00
Use the read-only replica for JPA invoicing (#1494)
* Use the read-only replica for JPA invoicing
This commit is contained in:
parent
c8636f6c90
commit
7a14f23c79
2 changed files with 17 additions and 11 deletions
|
@ -32,6 +32,7 @@ import com.google.common.net.MediaType;
|
||||||
import google.registry.config.RegistryConfig.Config;
|
import google.registry.config.RegistryConfig.Config;
|
||||||
import google.registry.config.RegistryEnvironment;
|
import google.registry.config.RegistryEnvironment;
|
||||||
import google.registry.model.common.DatabaseMigrationStateSchedule.PrimaryDatabase;
|
import google.registry.model.common.DatabaseMigrationStateSchedule.PrimaryDatabase;
|
||||||
|
import google.registry.persistence.PersistenceModule;
|
||||||
import google.registry.reporting.ReportingModule;
|
import google.registry.reporting.ReportingModule;
|
||||||
import google.registry.request.Action;
|
import google.registry.request.Action;
|
||||||
import google.registry.request.Parameter;
|
import google.registry.request.Parameter;
|
||||||
|
@ -120,17 +121,16 @@ public class GenerateInvoicesAction implements Runnable {
|
||||||
.setContainerSpecGcsPath(
|
.setContainerSpecGcsPath(
|
||||||
String.format("%s/%s_metadata.json", stagingBucketUrl, PIPELINE_NAME))
|
String.format("%s/%s_metadata.json", stagingBucketUrl, PIPELINE_NAME))
|
||||||
.setParameters(
|
.setParameters(
|
||||||
ImmutableMap.of(
|
new ImmutableMap.Builder<String, String>()
|
||||||
"yearMonth",
|
.put("yearMonth", yearMonth.toString("yyyy-MM"))
|
||||||
yearMonth.toString("yyyy-MM"),
|
.put("invoiceFilePrefix", invoiceFilePrefix)
|
||||||
"invoiceFilePrefix",
|
.put("database", database.name())
|
||||||
invoiceFilePrefix,
|
.put("billingBucketUrl", billingBucketUrl)
|
||||||
"database",
|
.put("registryEnvironment", RegistryEnvironment.get().name())
|
||||||
database.name(),
|
.put(
|
||||||
"billingBucketUrl",
|
"jpaTransactionManagerType",
|
||||||
billingBucketUrl,
|
PersistenceModule.JpaTransactionManagerType.READ_ONLY_REPLICA.toString())
|
||||||
"registryEnvironment",
|
.build());
|
||||||
RegistryEnvironment.get().name()));
|
|
||||||
LaunchFlexTemplateResponse launchResponse =
|
LaunchFlexTemplateResponse launchResponse =
|
||||||
dataflow
|
dataflow
|
||||||
.projects()
|
.projects()
|
||||||
|
|
|
@ -69,6 +69,12 @@
|
||||||
"regexes": [
|
"regexes": [
|
||||||
"^DATASTORE|CLOUD_SQL$"
|
"^DATASTORE|CLOUD_SQL$"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "jpaTransactionManagerType",
|
||||||
|
"label": "The type of JPA transaction manager to use if using SQL",
|
||||||
|
"helpText": "The standard SQL instance or a read-only replica may be used",
|
||||||
|
"regexes": ["^REGULAR|READ_ONLY_REPLICA$"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue