Skip to content

Instantly share code, notes, and snippets.

@petyosi
Created December 8, 2010 09:42
Show Gist options
  • Save petyosi/733091 to your computer and use it in GitHub Desktop.
Save petyosi/733091 to your computer and use it in GitHub Desktop.
def self.perform(note_id)
...
rescue ActiveRecord::StatementInvalid
Note.connection.reconnect!
retry
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment