mirror of
https://github.com/google/nomulus.git
synced 2025-05-12 22:38:16 +02:00
Make lock index parameters non-optional
The optional code has been around for a while, we can get rid of it now. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=192344612
This commit is contained in:
parent
3dfd141e0f
commit
ea995cf801
1 changed files with 3 additions and 5 deletions
|
@ -24,7 +24,7 @@ import static google.registry.dns.PublishDnsUpdatesAction.PARAM_NUM_PUBLISH_LOCK
|
|||
import static google.registry.dns.PublishDnsUpdatesAction.PARAM_PUBLISH_TASK_ENQUEUED;
|
||||
import static google.registry.dns.PublishDnsUpdatesAction.PARAM_REFRESH_REQUEST_CREATED;
|
||||
import static google.registry.request.RequestParameters.extractEnumParameter;
|
||||
import static google.registry.request.RequestParameters.extractOptionalIntParameter;
|
||||
import static google.registry.request.RequestParameters.extractIntParameter;
|
||||
import static google.registry.request.RequestParameters.extractRequiredParameter;
|
||||
import static google.registry.request.RequestParameters.extractSetOfParameters;
|
||||
|
||||
|
@ -96,15 +96,13 @@ public abstract class DnsModule {
|
|||
@Provides
|
||||
@Parameter(PARAM_LOCK_INDEX)
|
||||
static int provideLockIndex(HttpServletRequest req) {
|
||||
// TODO(b/72150053): Make non-optional once this cl has reached production for an hour
|
||||
return extractOptionalIntParameter(req, PARAM_LOCK_INDEX).orElse(1);
|
||||
return extractIntParameter(req, PARAM_LOCK_INDEX);
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Parameter(PARAM_NUM_PUBLISH_LOCKS)
|
||||
static int provideMaxNumLocks(HttpServletRequest req) {
|
||||
// TODO(b/72150053): Make non-optional once this cl has reached production for an hour
|
||||
return extractOptionalIntParameter(req, PARAM_NUM_PUBLISH_LOCKS).orElse(1);
|
||||
return extractIntParameter(req, PARAM_NUM_PUBLISH_LOCKS);
|
||||
}
|
||||
|
||||
@Provides
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue