<commit_before># encoding: UTF-8

require 'simultaneous'

module Spontaneous
  module Publishing
    class Simultaneous

      def self.task_name
        # TODO: add site name to this to make it unique on a server
        :publish
      end

      def self.spot_binary
        ::Spontaneous.config.spontaneous_binary || default_spot_binary
      end

      def self.default_spot_binary
        (Pathname.new(Spontaneous.gem_dir) + "bin/spot").expand_path.to_s
      end

      def self.register_task
        publish_binary = spot_binary + " site:publish"
        site_root = Pathname.new(Spontaneous.root).expand_path.to_s
        niceness = S.config.publish_niceness || 15
        logfile =  "#{site_root}/log/publish.log"
        # TODO: make nice value configurable
        task_options = {
          :niceness => niceness,
          :logfile => logfile,
          :pwd => site_root
        }
<commit_msg>Launch correct task to publish site<commit_after># encoding: UTF-8

require 'simultaneous'

module Spontaneous
  module Publishing
    class Simultaneous

      def self.task_name
        # TODO: add site name to this to make it unique on a server
        :publish
      end

      def self.spot_binary
        ::Spontaneous.config.spontaneous_binary || default_spot_binary
      end

      def self.default_spot_binary
        (Pathname.new(Spontaneous.gem_dir) + "bin/spot").expand_path.to_s
      end

      def self.register_task
        publish_binary = spot_binary + " site publish"
        site_root = Pathname.new(Spontaneous.root).expand_path.to_s
        niceness = S.config.publish_niceness || 15
        logfile =  "#{site_root}/log/publish.log"
        # TODO: make nice value configurable
        task_options = {
          :niceness => niceness,
          :logfile => logfile,
          :pwd => site_root
        }

{'fraction_non_alphanumeric': 0.08106637649619151, 'fraction_numerical': 0.003264417845484222, 'mean_word_length': 2.325497287522604, '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': '4658052', 'n_tokens_mistral': 561, 'n_tokens_neox': 548, 'n_words': 130}