<p>This PR builds on <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="376027412" data-permission-text="Issue title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/2037" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/2037/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/2037">#2037</a> and configures email sending as a background task.</p>
<p>Note that this depends on having the setup for delayed_job (<a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="376027412" data-permission-text="Issue title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/2037" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/2037/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/2037">#2037</a>) already merged, along with having workers running in production, before this can be deployed - so I'm marking it as WIP until those prerequisites are met.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/openstreetmap/openstreetmap-website/pull/2038'>https://github.com/openstreetmap/openstreetmap-website/pull/2038</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Set up Delayed Job as the backend for Active Job</li>
  <li>Use deliver_later for all email sending</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-0">.rubocop_todo.yml</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-1">Gemfile</a>
    (1)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-2">Gemfile.lock</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-3">app/controllers/changeset_controller.rb</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-4">app/controllers/diary_entry_controller.rb</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-5">app/controllers/messages_controller.rb</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-6">app/controllers/notes_controller.rb</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-7">app/controllers/users_controller.rb</a>
    (10)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-8">config/application.rb</a>
    (3)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-9">config/environments/test.rb</a>
    (3)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-10">db/migrate/20181031113522_create_delayed_jobs.rb</a>
    (22)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-11">db/structure.sql</a>
    (62)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-12">test/controllers/changeset_controller_test.rb</a>
    (12)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-13">test/controllers/diary_entry_controller_test.rb</a>
    (24)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-14">test/controllers/messages_controller_test.rb</a>
    (46)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-15">test/controllers/notes_controller_test.rb</a>
    (12)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-16">test/controllers/users_controller_test.rb</a>
    (82)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-17">test/integration/user_creation_test.rb</a>
    (584)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-18">test/test_helper.rb</a>
    (1)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/2038.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/2038.patch</a></li>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/2038.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/2038.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2038">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABWnLbXdDwMWBrRPP4kqZFuw_2xgdWfOks5uqccMgaJpZM4YEX7H">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABWnLZqDPxCs1Aiue-kXlL2eVP34xcVvks5uqccMgaJpZM4YEX7H.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/openstreetmap/openstreetmap-website","title":"openstreetmap/openstreetmap-website","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/openstreetmap/openstreetmap-website"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"[WIP] Use deliver_later for email sending (#2038)"}],"action":{"name":"View Pull Request","url":"https://github.com/openstreetmap/openstreetmap-website/pull/2038"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/2038",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/2038",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "[WIP] Use deliver_later for email sending (#2038)",
"sections": [
{
"text": "",
"activityTitle": "**Andy Allan**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@gravitystorm",
"facts": [

]
},
{
"title": "Commit Summary",
"facts": [
{
"name": "801522c",
"value": "Set up Delayed Job as the backend for Active Job"
},
{
"name": "b54362d",
"value": "Use deliver_later for all email sending"
}
]
},
{
"title": "File Changes",
"facts": [
{
"name": "Modified",
"value": "[.rubocop_todo.yml](https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-0) (4 changes)"
},
{
"name": "Modified",
"value": "[Gemfile](https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-1) (1 changes)"
},
{
"name": "Modified",
"value": "[Gemfile.lock](https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-2) (6 changes)"
},
{
"name": "Modified",
"value": "[app/controllers/changeset_controller.rb](https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-3) (2 changes)"
},
{
"name": "Modified",
"value": "[app/controllers/diary_entry_controller.rb](https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-4) (2 changes)"
},
{
"name": "Modified",
"value": "[app/controllers/messages_controller.rb](https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-5) (2 changes)"
},
{
"name": "Modified",
"value": "[app/controllers/notes_controller.rb](https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-6) (2 changes)"
},
{
"name": "Modified",
"value": "[app/controllers/users_controller.rb](https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-7) (10 changes)"
},
{
"name": "Modified",
"value": "[config/application.rb](https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-8) (3 changes)"
},
{
"name": "Modified",
"value": "[config/environments/test.rb](https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-9) (3 changes)"
},
{
"name": "Added",
"value": "[db/migrate/20181031113522_create_delayed_jobs.rb](https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-10) (22 changes)"
},
{
"name": "Modified",
"value": "[db/structure.sql](https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-11) (62 changes)"
},
{
"name": "Modified",
"value": "[test/controllers/changeset_controller_test.rb](https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-12) (12 changes)"
},
{
"name": "Modified",
"value": "[test/controllers/diary_entry_controller_test.rb](https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-13) (24 changes)"
},
{
"name": "Modified",
"value": "[test/controllers/messages_controller_test.rb](https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-14) (46 changes)"
},
{
"name": "Modified",
"value": "[test/controllers/notes_controller_test.rb](https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-15) (12 changes)"
},
{
"name": "Modified",
"value": "[test/controllers/users_controller_test.rb](https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-16) (82 changes)"
},
{
"name": "Modified",
"value": "[test/integration/user_creation_test.rb](https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-17) (584 changes)"
},
{
"name": "Modified",
"value": "[test/test_helper.rb](https://github.com/openstreetmap/openstreetmap-website/pull/2038/files#diff-18) (1 changes)"
}
]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"openstreetmap/openstreetmap-website\",\n\"issueId\": 2038,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close pull request",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"PullRequestClose\",\n\"repositoryFullName\": \"openstreetmap/openstreetmap-website\",\n\"pullRequestId\": 2038\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/openstreetmap/openstreetmap-website/pull/2038"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/openstreetmap/openstreetmap-website/pull/2038.patch"
}
],
"@type": "OpenUri",
"name": "View patch"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/openstreetmap/openstreetmap-website/pull/2038.diff"
}
],
"@type": "OpenUri",
"name": "View diff"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 403799751\n}"
}
],
"themeColor": "26292E"
}
]</script>