<commit_before>require "sidekiq"

begin
  require "keen"
rescue LoadError
end

module Travis
  class TravisYmlStats
    class KeenPublisher
      include ::Sidekiq::Worker

      sidekiq_options queue: :keen_events

      def perform(payload, deployment_payload)
        if defined?(Keen) && ENV["KEEN_PROJECT_ID"]
          payload = { :requests => [payload] }
          payload[:deployments] = deployment_payload if deployment_payload.size > 0
          Keen.publish_batch({:requests => [payload], :deployments => deployment_payload})
        end
      end
    end

    LANGUAGE_VERSION_KEYS = %w[
      ghc
      go
      jdk
      node_js
      otp_release
      perl
      php
      python
      ruby
      rvm
      scala
    ]<commit_msg>Publish data minimally<commit_after>require "sidekiq"

begin
  require "keen"
rescue LoadError
end

module Travis
  class TravisYmlStats
    class KeenPublisher
      include ::Sidekiq::Worker

      sidekiq_options queue: :keen_events

      def perform(payload, deployment_payload)
        if defined?(Keen) && ENV["KEEN_PROJECT_ID"]
          payload = { :requests => [payload] }
          payload[:deployments] = deployment_payload if deployment_payload.size > 0
          Keen.publish_batch(payload)
        end
      end
    end

    LANGUAGE_VERSION_KEYS = %w[
      ghc
      go
      jdk
      node_js
      otp_release
      perl
      php
      python
      ruby
      rvm
      scala
    ]
{'fraction_non_alphanumeric': 0.07123098201936376, 'fraction_numerical': 0.0013831258644536654, 'mean_word_length': 2.2155555555555555, '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': '5424965', 'n_tokens_mistral': 468, 'n_tokens_neox': 438, 'n_words': 105}