Skip to content

Instantly share code, notes, and snippets.

@kbaum
Created May 8, 2012 11:40
Show Gist options
  • Save kbaum/2634403 to your computer and use it in GitHub Desktop.
Save kbaum/2634403 to your computer and use it in GitHub Desktop.
module ResqueJob
class CheckMailDelivery
@queue = :medium
def self.perform
gmail = Gmail.connect('stillalive.features', 'ourlittlesecret')
raise "Still Alive mails not being delivered" if gmail.mailbox('[Gmail]/All Mail').emails.last.date.to_time < 30.minutes.ago
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment