{"action":"created","issue":{"url":"https://api.github.com/repos/YaleSTC/reservations/issues/1302","labels_url":"https://api.github.com/repos/YaleSTC/reservations/issues/1302/labels{/name}","comments_url":"https://api.github.com/repos/YaleSTC/reservations/issues/1302/comments","events_url":"https://api.github.com/repos/YaleSTC/reservations/issues/1302/events","html_url":"https://github.com/YaleSTC/reservations/issues/1302","id":107424213,"number":1302,"title":"Figure out proper cron setup for production vs staging","user":{"login":"orenyk","id":901808,"avatar_url":"https://avatars.githubusercontent.com/u/901808?v=3","gravatar_id":"","url":"https://api.github.com/users/orenyk","html_url":"https://github.com/orenyk","followers_url":"https://api.github.com/users/orenyk/followers","following_url":"https://api.github.com/users/orenyk/following{/other_user}","gists_url":"https://api.github.com/users/orenyk/gists{/gist_id}","starred_url":"https://api.github.com/users/orenyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orenyk/subscriptions","organizations_url":"https://api.github.com/users/orenyk/orgs","repos_url":"https://api.github.com/users/orenyk/repos","events_url":"https://api.github.com/users/orenyk/events{/privacy}","received_events_url":"https://api.github.com/users/orenyk/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/YaleSTC/reservations/labels/2%20-%20Working","name":"2 - Working","color":"CCCCCC"},{"url":"https://api.github.com/repos/YaleSTC/reservations/labels/diff:%205","name":"diff: 5","color":"ffff55"},{"url":"https://api.github.com/repos/YaleSTC/reservations/labels/pri:%205","name":"pri: 5","color":"ff0000"},{"url":"https://api.github.com/repos/YaleSTC/reservations/labels/type:%20enhancement","name":"type: enhancement","color":"c7def8"}],"state":"open","locked":false,"assignee":{"login":"orenyk","id":901808,"avatar_url":"https://avatars.githubusercontent.com/u/901808?v=3","gravatar_id":"","url":"https://api.github.com/users/orenyk","html_url":"https://github.com/orenyk","followers_url":"https://api.github.com/users/orenyk/followers","following_url":"https://api.github.com/users/orenyk/following{/other_user}","gists_url":"https://api.github.com/users/orenyk/gists{/gist_id}","starred_url":"https://api.github.com/users/orenyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orenyk/subscriptions","organizations_url":"https://api.github.com/users/orenyk/orgs","repos_url":"https://api.github.com/users/orenyk/repos","events_url":"https://api.github.com/users/orenyk/events{/privacy}","received_events_url":"https://api.github.com/users/orenyk/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/YaleSTC/reservations/milestones/33","html_url":"https://github.com/YaleSTC/reservations/milestones/5.4.0","labels_url":"https://api.github.com/repos/YaleSTC/reservations/milestones/33/labels","id":1064155,"number":33,"title":"5.4.0","description":"First sprint of Fall 2015, bugfixes and urgent feature requests for v5.3.0.","creator":{"login":"orenyk","id":901808,"avatar_url":"https://avatars.githubusercontent.com/u/901808?v=3","gravatar_id":"","url":"https://api.github.com/users/orenyk","html_url":"https://github.com/orenyk","followers_url":"https://api.github.com/users/orenyk/followers","following_url":"https://api.github.com/users/orenyk/following{/other_user}","gists_url":"https://api.github.com/users/orenyk/gists{/gist_id}","starred_url":"https://api.github.com/users/orenyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orenyk/subscriptions","organizations_url":"https://api.github.com/users/orenyk/orgs","repos_url":"https://api.github.com/users/orenyk/repos","events_url":"https://api.github.com/users/orenyk/events{/privacy}","received_events_url":"https://api.github.com/users/orenyk/received_events","type":"User","site_admin":false},"open_issues":24,"closed_issues":0,"state":"open","created_at":"2015-04-12T23:26:36Z","updated_at":"2015-09-23T21:17:50Z","due_on":"2015-10-12T04:00:00Z","closed_at":null},"comments":5,"created_at":"2015-09-20T23:29:59Z","updated_at":"2015-09-25T12:13:54Z","closed_at":null,"body":"Currently, we primarily use our cron tasks to send e-mails but there are some that are used for time-based Reservation processing (e.g. marking missed, deleting old requests, etc). If we want to deploy to a staging environment with no e-mails, we can disable them using the `DISABLE_EMAILS` environment variable but the cron tasks that search for relevant reservations and send those e-mails will still run, taking up unnecessary resources. However, we can't just disable cron jobs on non-production environments (as our current Capistrano script would imply) since some of those are necessary for general operation.\r\n\r\nI'm not sure what the best solution is for this but it's something we should look into and resolve."},"comment":{"url":"https://api.github.com/repos/YaleSTC/reservations/issues/comments/143200201","html_url":"https://github.com/YaleSTC/reservations/issues/1302#issuecomment-143200201","issue_url":"https://api.github.com/repos/YaleSTC/reservations/issues/1302","id":143200201,"user":{"login":"orenyk","id":901808,"avatar_url":"https://avatars.githubusercontent.com/u/901808?v=3","gravatar_id":"","url":"https://api.github.com/users/orenyk","html_url":"https://github.com/orenyk","followers_url":"https://api.github.com/users/orenyk/followers","following_url":"https://api.github.com/users/orenyk/following{/other_user}","gists_url":"https://api.github.com/users/orenyk/gists{/gist_id}","starred_url":"https://api.github.com/users/orenyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orenyk/subscriptions","organizations_url":"https://api.github.com/users/orenyk/orgs","repos_url":"https://api.github.com/users/orenyk/repos","events_url":"https://api.github.com/users/orenyk/events{/privacy}","received_events_url":"https://api.github.com/users/orenyk/received_events","type":"User","site_admin":false},"created_at":"2015-09-25T12:13:54Z","updated_at":"2015-09-25T12:13:54Z","body":"Yea, we already specify the `whenever_environment` in deploy.rb. The problem, though, is that we want to pull the value from the `.env` file, so we won't know it in advance... we might be able to just read it directly based on the `deploy_dir` location within the whenever Capistrano task. I just have to make sure we can specify it differently for different deployment types (e.g. staging vs. production). I'll try to look into this next week.\r\n\r\nI have access to initiate builds on the dev Jenkins job, although I'm not sure if I have access to the new Capistrano-based one. Thanks for the offer of cron-clearing; I'm going to let Michael finish getting the deployment set up in general, and then we can focus on improving it :smile:."}}