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:
mcilwain 2017-06-09 10:04:19 -07:00 committed by Ben McIlwain
parent 0fdde1cc9e
commit 7002026da5
2 changed files with 4 additions and 14 deletions

View file

@ -43,7 +43,6 @@ import static google.registry.util.PipelineUtils.createJobPath;
import static java.math.RoundingMode.CEILING;
import static java.util.concurrent.TimeUnit.DAYS;
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.Queue;
@ -522,13 +521,9 @@ public class DeleteContactsAndHostsAction implements Runnable {
.setIsSuperuser(
Boolean.valueOf(
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(
(params.containsKey(PARAM_REQUESTED_TIME))
? DateTime.parse(params.get(PARAM_REQUESTED_TIME))
: DateTime.now(UTC))
DateTime.parse(
checkNotNull(params.get(PARAM_REQUESTED_TIME), "Requested time not specified")))
.setIsDeletionAllowed(doesResourceStateAllowDeletion(resource, now))
.setTask(task)
.build();