<commit_before>## Length

**Request:**

    LEN <queue_name>\r\n

**Response:**

    :<length>\r\n

**Example:**

    // Existing queue
    C: LEN my_queue\r\n
    S: :15\r\n

    // Empty/non-existent queue
    C: LEN nopenopenope\r\n
    S: :0\r\n


## Add

**Request:**

    ADD <queue_name> <retries> <value>\r\n

**Response:**

    +OK\r\n
    // ...or...
    -ERR <message>\r\n

**Example:**

    // Successful add
    C: ADD my_queue 3 {"thing": 1, "also": "abc"}\r\n
    S: +OK\r\n

    // Failed add
    C: ADD nopenopenope 1 \r\n
    S: -ERR No body provided.\r\n

## Reserve

**Request:**

    RESERVE <queue_name>\r\n

**Response:**

    +<id> <body>\r\n
    // ...or...
    :-1\r\n

**Example:**

    // Successful reserve
    C: RESERVE my_queue\r\n
    S: +0269073f-f624-4cf9-8c53-ab3d194137b3 {"thing": 1, "also": "abc"}\r\n

    // Empty queue
    C: RESERVE my_queue\r\n
    S: :-1\r\n

## Retry

**Request:**

    RETRY <queue_name> <id>\r\n

**Response:**

    +OK\r\n
    // ...or...
    -ERR <message>\r\n

**Example:**

    // Can retry
    C: RETRY my_queue 0269073f-f624-4cf9-8c53-ab3d194137b3\r\n
    S: +OK\r\n

    // Out of retries
    C: RETRY my_queue 0269073f-f624-4cf9-8c53-ab3d194137b3\r\n
    S: :0\r\n

## Done

**Request:**

    DONE <queue_name> <id>\r\n

**Response:**

    +OK\r\n
    // ...or...<commit_msg>Protocol tweaks.<commit_after>## Length

**Request:**

    LEN <queue_name>\r\n

**Response:**

    :<length>\r\n

**Example:**

    // Existing queue
    C: LEN my_queue\r\n
    S: :15\r\n

    // Empty/non-existent queue
    C: LEN nopenopenope\r\n
    S: :0\r\n


## Add

**Request:**

    ADD <queue_name> <retries> <value>\r\n

**Response:**

    +<id>\r\n
    // ...or...
    -ERR <message>\r\n

**Example:**

    // Successful add
    C: ADD my_queue 3 {"thing": 1, "also": "abc"}\r\n
    S: +0269073f-f624-4cf9-8c53-ab3d194137b3\r\n

    // Failed add
    C: ADD nopenopenope 1 \r\n
    S: -ERR No body provided.\r\n

## Reserve

**Request:**

    RESERVE <queue_name>\r\n

**Response:**

    +<id> <body>\r\n
    // ...or...
    :-1\r\n

**Example:**

    // Successful reserve
    C: RESERVE my_queue\r\n
    S: +0269073f-f624-4cf9-8c53-ab3d194137b3 {"thing": 1, "also": "abc"}\r\n

    // Empty queue
    C: RESERVE my_queue\r\n
    S: :-1\r\n

## Retry

**Request:**

    RETRY <queue_name> <id>\r\n

**Response:**

    +OK\r\n
    // ...or...
    -ERR <message>\r\n

**Example:**

    // Can retry
    C: RETRY my_queue 0269073f-f624-4cf9-8c53-ab3d194137b3\r\n
    S: +OK\r\n

    // Out of retries
    C: RETRY my_queue 0269073f-f624-4cf9-8c53-ab3d194137b3\r\n
    S: -ERR No retries remaining.\r\n

## Done

**Request:**

    DONE <queue_name> <id>\r\n

**Response:**

    +OK\r\n
    // ...or...
{'fraction_non_alphanumeric': 0.21167089525190286, 'fraction_numerical': 0.06524102935846321, 'mean_word_length': 1.9361702127659575, 'pattern_counts': {'":': 8, '<': 32, '<?xml version=': 0, '>': 32, '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': '44207', 'n_tokens_mistral': 1367, 'n_tokens_neox': 1225, 'n_words': 247}