{"action":"created","issue":{"url":"https://api.github.com/repos/bitzesty/trade-tariff-backend/issues/94","repository_url":"https://api.github.com/repos/bitzesty/trade-tariff-backend","labels_url":"https://api.github.com/repos/bitzesty/trade-tariff-backend/issues/94/labels{/name}","comments_url":"https://api.github.com/repos/bitzesty/trade-tariff-backend/issues/94/comments","events_url":"https://api.github.com/repos/bitzesty/trade-tariff-backend/issues/94/events","html_url":"https://github.com/bitzesty/trade-tariff-backend/pull/94","id":171948841,"number":94,"title":"Prevent sending more than 1 email per day","user":{"login":"theharq","id":1143421,"avatar_url":"https://avatars.githubusercontent.com/u/1143421?v=3","gravatar_id":"","url":"https://api.github.com/users/theharq","html_url":"https://github.com/theharq","followers_url":"https://api.github.com/users/theharq/followers","following_url":"https://api.github.com/users/theharq/following{/other_user}","gists_url":"https://api.github.com/users/theharq/gists{/gist_id}","starred_url":"https://api.github.com/users/theharq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theharq/subscriptions","organizations_url":"https://api.github.com/users/theharq/orgs","repos_url":"https://api.github.com/users/theharq/repos","events_url":"https://api.github.com/users/theharq/events{/privacy}","received_events_url":"https://api.github.com/users/theharq/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-18T16:50:27Z","updated_at":"2016-08-18T18:07:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bitzesty/trade-tariff-backend/pulls/94","html_url":"https://github.com/bitzesty/trade-tariff-backend/pull/94","diff_url":"https://github.com/bitzesty/trade-tariff-backend/pull/94.diff","patch_url":"https://github.com/bitzesty/trade-tariff-backend/pull/94.patch"},"body":"#### What this PR does:\r\n\r\nThis is a workaround to have a flag that will be switch until the end of the day.\r\n\r\nCurrently calling these methods triggers an email, and since the sync process runs every hour an email is sent every hour.\r\n\r\nThis change takes advantage of the low level caching system to invalidate after certain amount of time.\r\n\r\nWe cannot persist the state of the email sent in the db because none of this cases are for a specific tariff update."},"comment":{"url":"https://api.github.com/repos/bitzesty/trade-tariff-backend/issues/comments/240806972","html_url":"https://github.com/bitzesty/trade-tariff-backend/pull/94#issuecomment-240806972","issue_url":"https://api.github.com/repos/bitzesty/trade-tariff-backend/issues/94","id":240806972,"user":{"login":"matthewford","id":215,"avatar_url":"https://avatars.githubusercontent.com/u/215?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewford","html_url":"https://github.com/matthewford","followers_url":"https://api.github.com/users/matthewford/followers","following_url":"https://api.github.com/users/matthewford/following{/other_user}","gists_url":"https://api.github.com/users/matthewford/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewford/subscriptions","organizations_url":"https://api.github.com/users/matthewford/orgs","repos_url":"https://api.github.com/users/matthewford/repos","events_url":"https://api.github.com/users/matthewford/events{/privacy}","received_events_url":"https://api.github.com/users/matthewford/received_events","type":"User","site_admin":false},"created_at":"2016-08-18T18:07:26Z","updated_at":"2016-08-18T18:07:26Z","body":"@theharq technically the sync schedule is like 8pm -> 8am, so end of day cache might not work"}}
{"actor":{"display_login":"matthewford"}}