mirror of
https://github.com/google/nomulus.git
synced 2025-05-28 16:30:12 +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.RegistryEnvironment;
|
||||
import google.registry.model.common.DatabaseMigrationStateSchedule.PrimaryDatabase;
|
||||
import google.registry.persistence.PersistenceModule;
|
||||
import google.registry.reporting.ReportingModule;
|
||||
import google.registry.request.Action;
|
||||
import google.registry.request.Parameter;
|
||||
|
@ -120,17 +121,16 @@ public class GenerateInvoicesAction implements Runnable {
|
|||
.setContainerSpecGcsPath(
|
||||
String.format("%s/%s_metadata.json", stagingBucketUrl, PIPELINE_NAME))
|
||||
.setParameters(
|
||||
ImmutableMap.of(
|
||||
"yearMonth",
|
||||
yearMonth.toString("yyyy-MM"),
|
||||
"invoiceFilePrefix",
|
||||
invoiceFilePrefix,
|
||||
"database",
|
||||
database.name(),
|
||||
"billingBucketUrl",
|
||||
billingBucketUrl,
|
||||
"registryEnvironment",
|
||||
RegistryEnvironment.get().name()));
|
||||
new ImmutableMap.Builder<String, String>()
|
||||
.put("yearMonth", yearMonth.toString("yyyy-MM"))
|
||||
.put("invoiceFilePrefix", invoiceFilePrefix)
|
||||
.put("database", database.name())
|
||||
.put("billingBucketUrl", billingBucketUrl)
|
||||
.put("registryEnvironment", RegistryEnvironment.get().name())
|
||||
.put(
|
||||
"jpaTransactionManagerType",
|
||||
PersistenceModule.JpaTransactionManagerType.READ_ONLY_REPLICA.toString())
|
||||
.build());
|
||||
LaunchFlexTemplateResponse launchResponse =
|
||||
dataflow
|
||||
.projects()
|
||||
|
|
|
@ -69,6 +69,12 @@
|
|||
"regexes": [
|
||||
"^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