mirror of
https://github.com/google/nomulus.git
synced 2025-06-27 14:54:51 +02:00
Deploy spec11 reporting to production
This turns on spec11 reporting in production by adding it to the cron.xml, generating the report and sending an e-mail with a list of all problematic registrations to the associated registrar on the 2nd of each month at 15:00Z (11am EST) This also tweaks the e-mail template a bit according to suggestions from Bruno. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=213031440
This commit is contained in:
parent
cdcd5c2a0e
commit
f36c72cca0
5 changed files with 49 additions and 21 deletions
|
@ -39,7 +39,7 @@ import org.joda.time.YearMonth;
|
|||
* pipeline accordingly.
|
||||
*
|
||||
* <p>This calls {@link Spec11EmailUtils#emailSpec11Reports()} on success or {@link
|
||||
* Spec11EmailUtils#sendFailureAlertEmail(String)} on failure.
|
||||
* Spec11EmailUtils#sendAlertEmail(String, String)} on failure.
|
||||
*/
|
||||
@Action(path = PublishSpec11ReportAction.PATH, method = POST, auth = Auth.AUTH_INTERNAL_OR_ADMIN)
|
||||
public class PublishSpec11ReportAction implements Runnable {
|
||||
|
@ -88,7 +88,8 @@ public class PublishSpec11ReportAction implements Runnable {
|
|||
case JOB_FAILED:
|
||||
logger.atSevere().log("Dataflow job %s finished unsuccessfully.", jobId);
|
||||
response.setStatus(SC_NO_CONTENT);
|
||||
emailUtils.sendFailureAlertEmail(
|
||||
emailUtils.sendAlertEmail(
|
||||
String.format("Spec11 Dataflow Pipeline Failure %s", yearMonth.toString()),
|
||||
String.format(
|
||||
"Spec11 %s job %s ended in status failure.", yearMonth.toString(), jobId));
|
||||
break;
|
||||
|
@ -99,7 +100,8 @@ public class PublishSpec11ReportAction implements Runnable {
|
|||
}
|
||||
} catch (IOException e) {
|
||||
logger.atSevere().withCause(e).log("Failed to publish Spec11 reports.");
|
||||
emailUtils.sendFailureAlertEmail(
|
||||
emailUtils.sendAlertEmail(
|
||||
String.format("Spec11 Publish Failure %s", yearMonth.toString()),
|
||||
String.format(
|
||||
"Spec11 %s publish action failed due to %s", yearMonth.toString(), e.getMessage()));
|
||||
response.setStatus(SC_INTERNAL_SERVER_ERROR);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue