mirror of
https://github.com/google/nomulus.git
synced 2025-05-19 10:49:35 +02:00
Run the Spec11 pipeline daily without sending emails
Add a sendSpec11Email parameter that allows us to only send the email on one run per month. Next, we will compute the diffs between the daily runs and send daily emails with those diffs. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=224404653
This commit is contained in:
parent
3ef8cd692d
commit
ec26e3a96a
20 changed files with 434 additions and 158 deletions
|
@ -28,11 +28,13 @@ import com.google.common.collect.ImmutableMap;
|
|||
import com.google.common.flogger.FluentLogger;
|
||||
import com.google.common.net.MediaType;
|
||||
import google.registry.config.RegistryConfig.Config;
|
||||
import google.registry.reporting.ReportingModule;
|
||||
import google.registry.request.Action;
|
||||
import google.registry.request.Parameter;
|
||||
import google.registry.request.Response;
|
||||
import google.registry.request.auth.Auth;
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
import javax.inject.Inject;
|
||||
import org.joda.time.YearMonth;
|
||||
|
||||
|
@ -105,7 +107,13 @@ public class GenerateInvoicesAction implements Runnable {
|
|||
logger.atInfo().log("Got response: %s", launchResponse.getJob().toPrettyString());
|
||||
String jobId = launchResponse.getJob().getId();
|
||||
if (shouldPublish) {
|
||||
enqueueBeamReportingTask(PublishInvoicesAction.PATH, jobId, yearMonth);
|
||||
Map<String, String> beamTaskParameters =
|
||||
ImmutableMap.of(
|
||||
ReportingModule.PARAM_JOB_ID,
|
||||
jobId,
|
||||
ReportingModule.PARAM_YEAR_MONTH,
|
||||
yearMonth.toString());
|
||||
enqueueBeamReportingTask(PublishInvoicesAction.PATH, beamTaskParameters);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
logger.atWarning().withCause(e).log("Template Launch failed");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue