<commit_before>namespace "cms" do 

desc "Run a domain task"
task :domain_runner => :environment do |t|

  unless (ENV['DOMAIN']||ENV['DOMAIN_ID']) && ENV['CLASS'] && ENV['METHOD']
    raise 'USAGE: rake cms:domain_runner DOMAIN=DOMAIN_ID CLASS=CLASS_NAME METHOD=METHOD_NAME'
  end

  DomainModel.activate_domain((ENV['DOMAIN']||ENV['DOMAIN_ID']).to_i) 
  
  cls = ENV['CLASS'].constantize
  
  mthd = ENV['METHOD']
  
  cls.send(mthd)
  
end

end
<commit_msg>Added reset to local cache<commit_after>namespace "cms" do 

desc "Run a domain task"
task :domain_runner => :environment do |t|

  unless (ENV['DOMAIN']||ENV['DOMAIN_ID']) && ENV['CLASS'] && ENV['METHOD']
    raise 'USAGE: rake cms:domain_runner DOMAIN=DOMAIN_ID CLASS=CLASS_NAME METHOD=METHOD_NAME'
  end

  DomainModel.activate_domain((ENV['DOMAIN']||ENV['DOMAIN_ID']).to_i) 
  DataCache.reset_local_cache
  
  cls = ENV['CLASS'].constantize
  
  mthd = ENV['METHOD']
  
  cls.send(mthd)
  
end

end

{'fraction_non_alphanumeric': 0.15472481827622014, 'fraction_numerical': 0.0, 'mean_word_length': 4.987577639751553, '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': '3684902', 'n_tokens_mistral': 377, 'n_tokens_neox': 360, 'n_words': 71}