mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +02:00
Small fixes for orphan glue cleanup []
Moving to tools module for consistency. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=130435371
This commit is contained in:
parent
9b4ef23d92
commit
27820c512e
6 changed files with 13 additions and 14 deletions
|
@ -30,13 +30,13 @@ import javax.inject.Inject;
|
|||
import org.joda.time.DateTime;
|
||||
import org.joda.time.DateTimeZone;
|
||||
|
||||
/** A mapreduce that runs publishHost() on all active domains. */
|
||||
/** A mapreduce that enqueues publish tasks on all active domains. */
|
||||
@Action(path = "/_dr/task/refreshAllDomains")
|
||||
public class RefreshAllDomainsAction implements Runnable {
|
||||
|
||||
private static final FormattingLogger logger = FormattingLogger.getLoggerForCallerClass();
|
||||
|
||||
static DnsQueue dnsQueue = DnsQueue.create();
|
||||
private static DnsQueue dnsQueue = DnsQueue.create();
|
||||
|
||||
@Inject MapreduceRunner mrRunner;
|
||||
@Inject Response response;
|
||||
|
@ -48,7 +48,7 @@ public class RefreshAllDomainsAction implements Runnable {
|
|||
createJobPath(
|
||||
mrRunner
|
||||
.setJobName("Refresh all domains")
|
||||
.setModuleName("backend")
|
||||
.setModuleName("tools")
|
||||
.setDefaultMapShards(10)
|
||||
.runMapOnly(
|
||||
new RefreshAllDomainsActionMapper(),
|
||||
|
@ -61,8 +61,8 @@ public class RefreshAllDomainsAction implements Runnable {
|
|||
private static final long serialVersionUID = 1356876487351666133L;
|
||||
|
||||
@Override
|
||||
public final void map(final DomainResource domain) {
|
||||
final String domainName = domain.getFullyQualifiedDomainName();
|
||||
public void map(final DomainResource domain) {
|
||||
String domainName = domain.getFullyQualifiedDomainName();
|
||||
if (EppResourceUtils.isActive(domain, DateTime.now(DateTimeZone.UTC))) {
|
||||
try {
|
||||
dnsQueue.addDomainRefreshTask(domainName);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue