Skip to content

Instantly share code, notes, and snippets.

@codesnik
Created December 9, 2010 17:24
Show Gist options
  • Save codesnik/735013 to your computer and use it in GitHub Desktop.
Save codesnik/735013 to your computer and use it in GitHub Desktop.
def pnr_commit_really_hard
yield
result = pnr_commit_and_retrieve
# закоммитить такое не удастся. надо повторять
if result.message == "SIMULTANEOUS CHANGES TO PNR - USE WRA/RT TO PRINT OR IGNORE"
pnr_ignore_and_retrieve
yield
result = pnr_commit_and_retrieve
end
# ER;ER трюк - двойной коммит для обхода ворнингов
unless result.success?
pnr_commit_and_retrieve
end
# если и сейчас не вышло - не судьба!
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment