Re: Scheduler Re-running Tasks?
Suggestion for those with email jobs tied to scheduler. It maybe useful to have some code to check that the email only get sent once. To be honest, this should probably be built into any code that causes problems if it runs more than once. For instance, in your case, it's bad if an email is sent twice. It could be a billing job that would cause problems if it charged twice etc. In some ways that should be in the requirements for the code, and thus the tests. For instance, I have invoicing jobs that run every hour, but 99% of the time will decide to do nothing, but they run that frequently to ensure the timeliness of an invoice when one is required. N -- You received this message because you are subscribed to the Google Groups Heroku group. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/heroku?hl=en_US?hl=en
Programmatic access to heroku with the Heroku Client gem
I'm trying to replace some code in a Rake task that executes 'heroku config --long' and parses the output. I can do this: c = Heroku::Client.new(* Heroku::Auth.read_credentials) c.config_vars(my-app) Awesome, this returns the configuration variables for my-app as a Hash. The next problem is how to figure out the default app name - in development environments we often want to have our tasks run against our default development Heroku instance. The code I want to call is in lib/heroku/command/base.rb, extract_app_in_dir(Dir.pwd). There's quite a bit of logic underneath this, storing git remotes and what not. 1. Do you think this should be refactored so that one can call extract_app_in_dir without an instance of a class? 2. Is there a simple(r) way to get the default app name? Thanks, dB. -- dB. | Moscow - Geneva - Seattle - New York dblock.org http://www.dblock.org - @dblockdotorghttp://twitter.com/#!/dblockdotorg -- You received this message because you are subscribed to the Google Groups Heroku group. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/heroku?hl=en_US?hl=en