mirror of
https://github.com/google/nomulus.git
synced 2025-05-28 07:02:00 +02:00
Refactor LordnTask to LordnTaskUtils
Made it clear that it is a util class and moved some of the functions only used in NordnUploadAction (to NordnUploadAction). Also used Retrier to handle retries when leasing tasks. These changes allow us to no longer use InjectRule in related unit tests. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=217761117
This commit is contained in:
parent
0f1f418034
commit
b254269d2f
10 changed files with 170 additions and 176 deletions
|
@ -97,7 +97,7 @@ import google.registry.model.smd.EncodedSignedMark;
|
|||
import google.registry.model.transfer.TransferData;
|
||||
import google.registry.model.transfer.TransferData.Builder;
|
||||
import google.registry.model.transfer.TransferStatus;
|
||||
import google.registry.tmch.LordnTask;
|
||||
import google.registry.tmch.LordnTaskUtils;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
@ -363,9 +363,10 @@ public class DatastoreHelper {
|
|||
/** Persists a domain and enqueues a LORDN task of the appropriate type for it. */
|
||||
public static DomainResource persistDomainAndEnqueueLordn(final DomainResource domain) {
|
||||
final DomainResource persistedDomain = persistResource(domain);
|
||||
// Calls {@link LordnTask#enqueueDomainResourceTask} wrapped in an ofy transaction so that the
|
||||
// Calls {@link LordnTaskUtils#enqueueDomainResourceTask} wrapped in an ofy transaction so that
|
||||
// the
|
||||
// transaction time is set correctly.
|
||||
ofy().transactNew(() -> LordnTask.enqueueDomainResourceTask(persistedDomain));
|
||||
ofy().transactNew(() -> LordnTaskUtils.enqueueDomainResourceTask(persistedDomain));
|
||||
return persistedDomain;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue