<commit_before>(ns taoensso.carmine.message-queue
  "Carmine-backed Clojure message queue. All heavy lifting by Redis (2.6+).
  Simple implementation. Very simple API. Reliable. Fast.

  Currently ALPHA QUALITY!!!

  Redis keys:
    * mqueue:<qname>:messages      -> hash, {id content}
    * mqueue:<qname>:locks         -> hash, {id lock-acquired-time}
    * mqueue:<qname>:id-circle     -> list, rotating list of ids
    * mqueue:<qname>:recently-done -> set, used for efficient id removal from
                                      circle
    * mqueue:<qname>:backoff?      -> ttl flag, used for queue-wide (every-worker)
                                      polling backoff

  See http://antirez.com/post/250 for implementation details."
  {:author "<NAME>"}
  (:require [clojure.string   :as str]
            [taoensso.carmine :as car]
            [taoensso.carmine (protocol :as protocol)]
            [taoensso.timbre  :as timbre])
  (:import  [java.util UUID]))

(def ^:private qkey "Prefixed queue key"
  (memoize (car/make-keyfn "mqueue")))
<commit_msg>Housekeeping<commit_after>(ns taoensso.carmine.message-queue
  "Carmine-backed Clojure message queue. All heavy lifting by Redis (2.6+).
  Simple implementation. Very simple API. Reliable. Fast.

  Alpha - subject to change.

  Redis keys:
    * mqueue:<qname>:messages      -> hash, {id content}
    * mqueue:<qname>:locks         -> hash, {id lock-acquired-time}
    * mqueue:<qname>:id-circle     -> list, rotating list of ids
    * mqueue:<qname>:recently-done -> set, used for efficient id removal from
                                      circle
    * mqueue:<qname>:backoff?      -> ttl flag, used for queue-wide (every-worker)
                                      polling backoff

  Ref. http://antirez.com/post/250 for implementation details."
  {:author "<NAME>"}
  (:require [clojure.string   :as str]
            [taoensso.carmine :as car]
            [taoensso.carmine (protocol :as protocol)]
            [taoensso.timbre  :as timbre])
  (:import  [java.util UUID]))

(def ^:private qkey "Prefixed queue key"
  (memoize (car/make-keyfn "mqueue")))

{'fraction_non_alphanumeric': 0.125, 'fraction_numerical': 0.004699248120300752, 'mean_word_length': 2.358044164037855, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7044242', 'n_tokens_mistral': 712, 'n_tokens_neox': 677, 'n_words': 179}