mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 00:17:20 +02:00
Make dependency injection and construction of DnsQueue nicer
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=146783008
This commit is contained in:
parent
7986be139d
commit
f212a53232
4 changed files with 33 additions and 30 deletions
|
@ -41,6 +41,7 @@ import com.google.common.collect.ImmutableList;
|
|||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.net.InternetDomainName;
|
||||
import com.googlecode.objectify.Key;
|
||||
import dagger.Lazy;
|
||||
import google.registry.dns.DnsQueue;
|
||||
import google.registry.flows.EppException;
|
||||
import google.registry.flows.EppException.AuthorizationErrorException;
|
||||
|
@ -109,6 +110,7 @@ public class DomainAllocateFlow implements TransactionalFlow {
|
|||
@Inject @Superuser boolean isSuperuser;
|
||||
@Inject HistoryEntry.Builder historyBuilder;
|
||||
@Inject EppInput eppInput;
|
||||
@Inject Lazy<DnsQueue> dnsQueue;
|
||||
@Inject EppResponse.Builder responseBuilder;
|
||||
@Inject DomainPricingLogic pricingLogic;
|
||||
@Inject DomainAllocateFlow() {}
|
||||
|
@ -360,7 +362,7 @@ public class DomainAllocateFlow implements TransactionalFlow {
|
|||
|
||||
private void enqueueTasks(AllocateCreateExtension allocateCreate, DomainResource newDomain) {
|
||||
if (newDomain.shouldPublishToDns()) {
|
||||
DnsQueue.create().addDomainRefreshTask(newDomain.getFullyQualifiedDomainName());
|
||||
dnsQueue.get().addDomainRefreshTask(newDomain.getFullyQualifiedDomainName());
|
||||
}
|
||||
if (allocateCreate.getSmdId() != null || allocateCreate.getNotice() != null) {
|
||||
LordnTask.enqueueDomainResourceTask(newDomain);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue