mirror of
https://github.com/google/nomulus
synced 2026-01-08 07:11:44 +00:00
Use Dagger to @Inject DnsQueue everywhere that is feasible
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=136062053
This commit is contained in:
@@ -105,6 +105,7 @@ public final class HostUpdateFlow extends LoggedInFlow implements TransactionalF
|
||||
@Inject @TargetId String targetId;
|
||||
@Inject HistoryEntry.Builder historyBuilder;
|
||||
@Inject AsyncFlowEnqueuer asyncFlowEnqueuer;
|
||||
@Inject DnsQueue dnsQueue;
|
||||
@Inject HostUpdateFlow() {}
|
||||
|
||||
@Override
|
||||
@@ -219,14 +220,14 @@ public final class HostUpdateFlow extends LoggedInFlow implements TransactionalF
|
||||
// Only update DNS for subordinate hosts. External hosts have no glue to write, so they
|
||||
// are only written as NS records from the referencing domain.
|
||||
if (existingResource.getSuperordinateDomain() != null) {
|
||||
DnsQueue.create().addHostRefreshTask(existingResource.getFullyQualifiedHostName());
|
||||
dnsQueue.addHostRefreshTask(existingResource.getFullyQualifiedHostName());
|
||||
}
|
||||
// In case of a rename, there are many updates we need to queue up.
|
||||
if (((Update) resourceCommand).getInnerChange().getFullyQualifiedHostName() != null) {
|
||||
// If the renamed host is also subordinate, then we must enqueue an update to write the new
|
||||
// glue.
|
||||
if (newResource.getSuperordinateDomain() != null) {
|
||||
DnsQueue.create().addHostRefreshTask(newResource.getFullyQualifiedHostName());
|
||||
dnsQueue.addHostRefreshTask(newResource.getFullyQualifiedHostName());
|
||||
}
|
||||
// We must also enqueue updates for all domains that use this host as their nameserver so
|
||||
// that their NS records can be updated to point at the new name.
|
||||
|
||||
Reference in New Issue
Block a user