Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

send notification email in case of failure #216

Merged
merged 3 commits into from
Jul 30, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ app.post('/api/request', function (req, res) {
var cmd = global.SENDMAIL + ' ' + state.get('status').toUpperCase() +
' ' + global.MAILING_LIST;

if (state.get('status') === Orchestrator.STATUS_ERROR) {
if (state.get('status') === Orchestrator.STATUS_ERROR ||
state.get('status') === Orchestrator.STATUS_FAILURE) {
cmd += ' ' + url + ' \'' + JSON.stringify(requests[id], null, 2) + '\'';
}
else {
Expand Down
2 changes: 1 addition & 1 deletion sendmail.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if [ "SUCCESS" == "$STATUS" ]; then
BODY="On `date -u`, $URI has been published by the W3C automated publication system ($RESULT).

If you believe there's an error, please contact webreq@w3.org."
elif [ "ERROR" == "$STATUS" ]; then
elif [ "ERROR" == "$STATUS" -o "FAILURE" == "$STATUS" ]; then
SUBJECT="[W3C Publication] Failed: $URI"
BODY="On `date -u`, the request to publish $URI failed. See details below.

Expand Down