mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 17:07:15 +02:00
Finish async task metrics data migration
Now that we've been live with the new code, all of the old tasks have been processed, and the fallback code to handle the situation of those fields not being specified is not necessary. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=158530336
This commit is contained in:
parent
0fdde1cc9e
commit
7002026da5
2 changed files with 4 additions and 14 deletions
|
@ -43,7 +43,6 @@ import static google.registry.util.PipelineUtils.createJobPath;
|
||||||
import static java.math.RoundingMode.CEILING;
|
import static java.math.RoundingMode.CEILING;
|
||||||
import static java.util.concurrent.TimeUnit.DAYS;
|
import static java.util.concurrent.TimeUnit.DAYS;
|
||||||
import static java.util.concurrent.TimeUnit.MINUTES;
|
import static java.util.concurrent.TimeUnit.MINUTES;
|
||||||
import static org.joda.time.DateTimeZone.UTC;
|
|
||||||
|
|
||||||
import com.google.appengine.api.taskqueue.LeaseOptions;
|
import com.google.appengine.api.taskqueue.LeaseOptions;
|
||||||
import com.google.appengine.api.taskqueue.Queue;
|
import com.google.appengine.api.taskqueue.Queue;
|
||||||
|
@ -522,13 +521,9 @@ public class DeleteContactsAndHostsAction implements Runnable {
|
||||||
.setIsSuperuser(
|
.setIsSuperuser(
|
||||||
Boolean.valueOf(
|
Boolean.valueOf(
|
||||||
checkNotNull(params.get(PARAM_IS_SUPERUSER), "Is superuser not specified")))
|
checkNotNull(params.get(PARAM_IS_SUPERUSER), "Is superuser not specified")))
|
||||||
// TODO(b/38386090): After push is completed and all old tasks are processed, change to:
|
|
||||||
// .setRequestedTime(DateTime.parse(
|
|
||||||
// checkNotNull(params.get(PARAM_REQUESTED_TIME), "Requested time not specified")))
|
|
||||||
.setRequestedTime(
|
.setRequestedTime(
|
||||||
(params.containsKey(PARAM_REQUESTED_TIME))
|
DateTime.parse(
|
||||||
? DateTime.parse(params.get(PARAM_REQUESTED_TIME))
|
checkNotNull(params.get(PARAM_REQUESTED_TIME), "Requested time not specified")))
|
||||||
: DateTime.now(UTC))
|
|
||||||
.setIsDeletionAllowed(doesResourceStateAllowDeletion(resource, now))
|
.setIsDeletionAllowed(doesResourceStateAllowDeletion(resource, now))
|
||||||
.setTask(task)
|
.setTask(task)
|
||||||
.build();
|
.build();
|
||||||
|
|
|
@ -29,7 +29,6 @@ import static google.registry.util.DateTimeUtils.latestOf;
|
||||||
import static google.registry.util.PipelineUtils.createJobPath;
|
import static google.registry.util.PipelineUtils.createJobPath;
|
||||||
import static java.util.concurrent.TimeUnit.DAYS;
|
import static java.util.concurrent.TimeUnit.DAYS;
|
||||||
import static java.util.concurrent.TimeUnit.MINUTES;
|
import static java.util.concurrent.TimeUnit.MINUTES;
|
||||||
import static org.joda.time.DateTimeZone.UTC;
|
|
||||||
|
|
||||||
import com.google.appengine.api.taskqueue.LeaseOptions;
|
import com.google.appengine.api.taskqueue.LeaseOptions;
|
||||||
import com.google.appengine.api.taskqueue.Queue;
|
import com.google.appengine.api.taskqueue.Queue;
|
||||||
|
@ -301,13 +300,9 @@ public class RefreshDnsOnHostRenameAction implements Runnable {
|
||||||
return new AutoValue_RefreshDnsOnHostRenameAction_DnsRefreshRequest.Builder()
|
return new AutoValue_RefreshDnsOnHostRenameAction_DnsRefreshRequest.Builder()
|
||||||
.setHostKey(hostKey)
|
.setHostKey(hostKey)
|
||||||
.setLastUpdateTime(host.getUpdateAutoTimestamp().getTimestamp())
|
.setLastUpdateTime(host.getUpdateAutoTimestamp().getTimestamp())
|
||||||
// TODO(b/38386090): After push is completed and all old tasks are processed, change to:
|
|
||||||
// .setRequestedTime(DateTime.parse(
|
|
||||||
// checkNotNull(params.get(PARAM_REQUESTED_TIME), "Requested time not specified")))
|
|
||||||
.setRequestedTime(
|
.setRequestedTime(
|
||||||
(params.containsKey(PARAM_REQUESTED_TIME))
|
DateTime.parse(
|
||||||
? DateTime.parse(params.get(PARAM_REQUESTED_TIME))
|
checkNotNull(params.get(PARAM_REQUESTED_TIME), "Requested time not specified")))
|
||||||
: DateTime.now(UTC))
|
|
||||||
.setIsRefreshNeeded(!isHostDeleted)
|
.setIsRefreshNeeded(!isHostDeleted)
|
||||||
.setTask(task)
|
.setTask(task)
|
||||||
.build();
|
.build();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue