mirror of
https://github.com/google/nomulus
synced 2026-01-04 04:04:22 +00:00
Fix minor items on recurring billing expansion MR
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=126060671
This commit is contained in:
@@ -203,7 +203,12 @@ public class ExpandRecurringBillingEventsAction implements Runnable {
|
||||
getContext().incrementCounter("error: " + t.getClass().getSimpleName());
|
||||
getContext().incrementCounter(ERROR_COUNTER);
|
||||
}
|
||||
getContext().incrementCounter("Saved OneTime billing events", billingEventsSaved);
|
||||
if (!isDryRun) {
|
||||
getContext().incrementCounter("Saved OneTime billing events", billingEventsSaved);
|
||||
} else {
|
||||
getContext().incrementCounter(
|
||||
"Generated OneTime billing events (dry run)", billingEventsSaved);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -236,8 +241,11 @@ public class ExpandRecurringBillingEventsAction implements Runnable {
|
||||
.filter(new Predicate<BillingEvent.OneTime>() {
|
||||
@Override
|
||||
public boolean apply(OneTime billingEvent) {
|
||||
return billingEvent.getCancellationMatchingBillingEvent().equals(
|
||||
Key.create(recurringEvent));
|
||||
Key<? extends BillingEvent> cancellationMatchingBillingEvent =
|
||||
billingEvent.getCancellationMatchingBillingEvent();
|
||||
return cancellationMatchingBillingEvent != null
|
||||
&& billingEvent.getCancellationMatchingBillingEvent().equals(
|
||||
Key.create(recurringEvent));
|
||||
}})
|
||||
.transform(new Function<OneTime, DateTime>() {
|
||||
@Override
|
||||
|
||||
@@ -21,6 +21,7 @@ import google.registry.backup.CommitLogCheckpointAction;
|
||||
import google.registry.backup.DeleteOldCommitLogsAction;
|
||||
import google.registry.backup.ExportCommitLogDiffAction;
|
||||
import google.registry.backup.RestoreCommitLogsAction;
|
||||
import google.registry.billing.ExpandRecurringBillingEventsAction;
|
||||
import google.registry.cron.CommitLogFanoutAction;
|
||||
import google.registry.cron.CronModule;
|
||||
import google.registry.cron.TldFanoutAction;
|
||||
@@ -87,6 +88,7 @@ interface BackendRequestComponent {
|
||||
DeleteHostResourceAction deleteHostResourceAction();
|
||||
DeleteOldCommitLogsAction deleteOldCommitLogsAction();
|
||||
DnsRefreshForHostRenameAction dnsRefreshForHostRenameAction();
|
||||
ExpandRecurringBillingEventsAction expandRecurringBillingEventsAction();
|
||||
ExportCommitLogDiffAction exportCommitLogDiffAction();
|
||||
ExportDomainListsAction exportDomainListsAction();
|
||||
ExportReservedTermsAction exportReservedTermsAction();
|
||||
|
||||
Reference in New Issue
Block a user