<commit_before>module SyncHelper
  def sync_user(user)
    unless user.is_syncing?
      if Travis::Features.enabled_for_all?(:sync_via_sidekiq)
        Travis::Sidekiq::SynchronizeUser.perform_async(user.id)
      else
        publisher = Travis::Amqp::Publisher.new('sync.user')
        publisher.publish({ user_id: user.id }, type: 'sync')
      end
      user.update_column(:is_syncing, true)
    end
  rescue => error
    user.update_column(:is_syncing, false)
  end
end<commit_msg>Reraise error when sync failed.<commit_after>module SyncHelper
  def sync_user(user)
    unless user.is_syncing?
      if Travis::Features.enabled_for_all?(:sync_via_sidekiq)
        Travis::Sidekiq::SynchronizeUser.perform_async(user.id)
      else
        publisher = Travis::Amqp::Publisher.new('sync.user')
        publisher.publish({ user_id: user.id }, type: 'sync')
      end
      user.update_column(:is_syncing, true)
    end
  rescue => error
    user.update_column(:is_syncing, false)
    raise
  end
end
{'fraction_non_alphanumeric': 0.11277445109780439, 'fraction_numerical': 0.0, 'mean_word_length': 3.5384615384615383, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '209613', 'n_tokens_mistral': 338, 'n_tokens_neox': 337, 'n_words': 58}