Convert remaining ofy() calls to auditedOfy() (#1200)

* Convert remaining ofy() calls to auditedOfy()
This commit is contained in:
gbrodman
2021-06-08 13:52:13 -04:00
committed by GitHub
parent 3f41f7f444
commit a1b56b0521
5 changed files with 22 additions and 19 deletions
@@ -51,7 +51,7 @@ import google.registry.model.translators.VKeyTranslatorFactory;
import java.util.concurrent.atomic.AtomicLong;
/**
* An instance of Ofy, obtained via {@code #ofy()}, should be used to access all persistable
* An instance of Ofy, obtained via {@code #auditedOfy()}, should be used to access all persistable
* objects. The class contains a static initializer to call factory().register(...) on all
* persistable objects in this package.
*/
@@ -14,7 +14,7 @@
package google.registry.tools.javascrap;
import static google.registry.model.ofy.ObjectifyService.ofy;
import static google.registry.model.ofy.ObjectifyService.auditedOfy;
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
import com.google.appengine.tools.mapreduce.Mapper;
@@ -111,7 +111,7 @@ public class CreateSyntheticHistoryEntriesAction implements Runnable {
public final void map(final Key<EppResource> resourceKey) {
tm().transact(
() -> {
EppResource eppResource = ofy().load().key(resourceKey).now();
EppResource eppResource = auditedOfy().load().key(resourceKey).now();
tm().put(
HistoryEntry.createBuilderForResource(eppResource)
.setClientId(registryAdminRegistrarId)