Cut over to batched async deletion for contacts/hosts

Also consolidates the DNS refresh functionality in AsyncFlowUtils that was
being used by HostUpdateFlow into AsyncFlowEnqueuer.

TESTED=I threw together some batch scripts to create dozens of contacts on
alpha and then request their deletion, and the [] ran fine and
successfully deleted them in batches.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133714691
This commit is contained in:
mcilwain 2016-09-20 09:29:39 -07:00 committed by Ben McIlwain
parent 65ff6b45d1
commit 2dcac3ca68
11 changed files with 74 additions and 190 deletions

View file

@ -15,7 +15,6 @@
package google.registry.flows.host;
import static com.google.common.truth.Truth.assertThat;
import static google.registry.flows.async.AsyncFlowUtils.ASYNC_FLOW_QUEUE_NAME;
import static google.registry.model.EppResourceUtils.loadByUniqueId;
import static google.registry.request.Actions.getPathForAction;
import static google.registry.testing.DatastoreHelper.assertNoBillingEvents;
@ -161,7 +160,7 @@ public class HostUpdateFlowTest extends ResourceFlowTestCase<HostUpdateFlow, Hos
HostResource renamedHost = doSuccessfulTest();
assertThat(renamedHost.getSuperordinateDomain()).isNull();
// Task enqueued to change the NS record of the referencing domain via mapreduce.
assertTasksEnqueued(ASYNC_FLOW_QUEUE_NAME, new TaskMatcher()
assertTasksEnqueued("flows-async", new TaskMatcher()
.url(getPathForAction(DnsRefreshForHostRenameAction.class))
.param(DnsRefreshForHostRenameAction.PARAM_HOST_KEY, Key.create(renamedHost).getString()));
}