Change depricated commit_on_success decorator to atomic