mirror of
https://github.com/google/nomulus.git
synced 2025-07-25 03:58:34 +02:00
Migrate writeLockTimeout field out of DnsQueue
This makes the usage of DnsQueue.create() safer, since we're no longer forced to hardcode a copy of the @Config("dnsWriteLockTimeout") value within that method. That value is only needed for leaseTasks(), which is only called in one place (ReadDnsQueueAction), so we can just pass it in from that callsite. Also removes an unused overload of leaseTasks() that allowed specifying a tag, which is a feature we no longer need. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=136162491
This commit is contained in:
parent
17475fe7e8
commit
e6ba5687b1
4 changed files with 7 additions and 25 deletions
|
@ -88,12 +88,12 @@ public class ReadDnsQueueActionTest {
|
|||
persistResource(Registry.get("example").asBuilder().setTldType(TldType.TEST).build());
|
||||
dnsQueue = new DnsQueue();
|
||||
dnsQueue.queue = getQueue(DNS_PULL_QUEUE_NAME);
|
||||
dnsQueue.writeLockTimeout = Duration.standardSeconds(10);
|
||||
}
|
||||
|
||||
private void run(boolean keepTasks) throws Exception {
|
||||
ReadDnsQueueAction action = new ReadDnsQueueAction();
|
||||
action.tldUpdateBatchSize = TEST_TLD_UPDATE_BATCH_SIZE;
|
||||
action.writeLockTimeout = Duration.standardSeconds(10);
|
||||
action.dnsQueue = dnsQueue;
|
||||
action.dnsPublishPushQueue = QueueFactory.getQueue(DNS_PUBLISH_PUSH_QUEUE_NAME);
|
||||
action.taskEnqueuer = new TaskEnqueuer(new Retrier(null, 1));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue