<commit_before>CheckoutController.class_eval do
  private
  def after_complete_with_openbravo
    after_complete_without_openbravo
    # TODO: move to Delayed::Job
    Openbravo::Order.create(@order)
  end
  alias_method_chain :after_complete, :openbravo
end
<commit_msg>Added support of DelayedJob for creation sales orders in Openbravo<commit_after>CheckoutController.class_eval do
  private
  def after_complete_with_openbravo
    after_complete_without_openbravo
    if defined? Delayed::Job 
      Openbravo::Order.delay.create(@order)
    else
      Openbravo::Order.create(@order)
    end
  end
  alias_method_chain :after_complete, :openbravo
end

{'fraction_non_alphanumeric': 0.061068702290076333, 'fraction_numerical': 0.0, 'mean_word_length': 5.074074074074074, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '127417', 'n_tokens_mistral': 210, 'n_tokens_neox': 205, 'n_words': 43}