<commit_before>require 'sidekiq-runner'

namespace :sidekiq do
  desc 'Start sidekiq node'
  task :start => :environment do
    puts 'Starting sidekiq...'
    SidekiqRunner.start
  end

  desc 'Stop sidekiq node'
  task :stop => :environment do
    puts 'Gracefully shutting down sidekiq...'
    SidekiqRunner.stop
  end

  desc 'Restart sidekiq node'
  task :restart => ['sidekiq:stop', 'sidekiq:start']
end<commit_msg>Only load Rails env if task is defined.<commit_after>require 'sidekiq-runner'

rails_env = Rake::Task.task_defined?(:environment) ? [:environment] : []

namespace :sidekiq do
  desc 'Start sidekiq node'
  task :start => rails_env do
    puts 'Starting sidekiq...'
    SidekiqRunner.start
  end

  desc 'Stop sidekiq node'
  task :stop => rails_env do
    puts 'Gracefully shutting down sidekiq...'
    SidekiqRunner.stop
  end

  desc 'Restart sidekiq node'
  task :restart => ['sidekiq:stop', 'sidekiq:start']
end
{'fraction_non_alphanumeric': 0.11134903640256959, 'fraction_numerical': 0.0, 'mean_word_length': 3.8195876288659796, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '92797', 'n_tokens_mistral': 327, 'n_tokens_neox': 318, 'n_words': 93}