mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Batch NORDN pull queue task deletions
They were failing because the maximum App Engine task batch size is 1,000, and we currently have more than 4,000 tasks in the pull queue. We keep re-uploading those to NORDN because we're unable to delete the tasks after successful upload, so the leases expire and they get processed again. Also renames TaskEnqueuer to TaskQueueUtils to reflect its newly expanded role. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=197060903
This commit is contained in:
parent
1248a7722b
commit
c989911526
21 changed files with 129 additions and 73 deletions
|
@ -34,7 +34,7 @@ import google.registry.request.Parameter;
|
|||
import google.registry.request.auth.Auth;
|
||||
import google.registry.security.XsrfTokenManager;
|
||||
import google.registry.util.FormattingLogger;
|
||||
import google.registry.util.TaskEnqueuer;
|
||||
import google.registry.util.TaskQueueUtils;
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
@ -147,8 +147,7 @@ public class LoadTestAction implements Runnable {
|
|||
@Parameter("hostInfos")
|
||||
int hostInfosPerSecond;
|
||||
|
||||
@Inject
|
||||
TaskEnqueuer taskEnqueuer;
|
||||
@Inject TaskQueueUtils taskQueueUtils;
|
||||
|
||||
private final String xmlContactCreateTmpl;
|
||||
private final String xmlContactCreateFail;
|
||||
|
@ -344,7 +343,7 @@ public class LoadTestAction implements Runnable {
|
|||
List<List<TaskOptions>> chunks = partition(tasks, maxTasksPerAdd());
|
||||
// Farm out tasks to multiple queues to work around queue qps quotas.
|
||||
for (int i = 0; i < chunks.size(); i++) {
|
||||
taskEnqueuer.enqueue(getQueue("load" + (i % NUM_QUEUES)), chunks.get(i));
|
||||
taskQueueUtils.enqueue(getQueue("load" + (i % NUM_QUEUES)), chunks.get(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue