Skip to content

Instantly share code, notes, and snippets.

@charliedavi
Created March 8, 2012 15:44
Show Gist options
  • Save charliedavi/2001582 to your computer and use it in GitHub Desktop.
Save charliedavi/2001582 to your computer and use it in GitHub Desktop.
class PostCodeGo
class << self
include TorqueBox::Messaging::Backgroundable
always_background :postcode, :priority => :normal
def postcode(time, origin, mode, email)
iso = Real::Chrone.new_or_cached(time: time, origin: origin, mode: mode.to_sym)
csvs = [iso.postcode_csv, iso.postcode_sector_csv, iso.postcode_district_csv]
CsvMailer.files(csvs, time, mode, email).deliver
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment