mirror of
https://github.com/google/nomulus
synced 2026-09-19 14:34:18 +00:00
Migrate away from VoidWorks
This is one last hanging piece of work left over from last year's Java 8 migration. There's no functionality changes in this CL, just refactoring. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=201947600
This commit is contained in:
@@ -24,7 +24,6 @@ import com.google.appengine.tools.cloudstorage.RetryParams;
|
||||
import com.google.appengine.tools.mapreduce.Mapper;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.flogger.FluentLogger;
|
||||
import com.googlecode.objectify.VoidWork;
|
||||
import google.registry.config.RegistryConfig.Config;
|
||||
import google.registry.config.RegistryConfig.ConfigModule;
|
||||
import google.registry.gcs.GcsUtils;
|
||||
@@ -139,14 +138,13 @@ public class RdeContactImportAction implements Runnable {
|
||||
// Record number of attempted map operations
|
||||
getContext().incrementCounter("contact imports attempted");
|
||||
logger.atInfo().log("Saving contact %s", xjcContact.getId());
|
||||
ofy().transact(new VoidWork() {
|
||||
@Override
|
||||
public void vrun() {
|
||||
ContactResource contact =
|
||||
XjcToContactResourceConverter.convertContact(xjcContact);
|
||||
getImportUtils().importEppResource(contact);
|
||||
}
|
||||
});
|
||||
ofy()
|
||||
.transact(
|
||||
() -> {
|
||||
ContactResource contact =
|
||||
XjcToContactResourceConverter.convertContact(xjcContact);
|
||||
getImportUtils().importEppResource(contact);
|
||||
});
|
||||
// Record number of contacts imported
|
||||
getContext().incrementCounter("contacts saved");
|
||||
logger.atInfo().log("Contact %s was imported successfully", xjcContact.getId());
|
||||
|
||||
Reference in New Issue
Block a user