<commit_before>// Type definitions for bull 3.3
// Project: https://github.com/OptimalBits/bull
// Definitions by: <NAME> <https://github.com/bgrieder>
//                 <NAME> <https://github.com/JProgrammer>
//                 <NAME> <https://github.com/marshall007>
//                 Weeco <https://github.com/weeco>
//                 <NAME> <https://github.com/blaugold>
//                 <NAME> <https://github.com/iamolegga>
//                 <NAME> <https://github.com/koblas>
//                 <NAME> <https://github.com/bondz>
//                 Wuha Team <https://github.com/wuha-team>
//                 <NAME> <https://github.com/aleccool213>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8

import * as Redis from "ioredis";
import * as Promise from "bluebird";

/**
 * This is the Queue constructor.
 * It creates a new Queue that is persisted in Redis.
 * Everytime the same queue is instantiated it tries to process all the old jobs that may exist from a previous unfinished session.
 */
declare const Bull: {
  (queueName: string, opts?: Bull.QueueOptions): Bull.Queue;
  (queueName: string, url?: string): Bull.Queue; // tslint:disable-line unified-signatures
  new (queueName: string, opts?: Bull.QueueOptions): Bull.Queue;
  new (queueName: string, url?: string): Bull.Queue; // tslint:disable-line unified-signatures
};

declare namespace Bull {
  interface RateLimiter {
    /** Max numbers of jobs processed */
    max: number;
    /** Per duration in milliseconds */
    duration: number;
  }

  interface QueueOptions {
    /**
     * Options passed directly to the `ioredis` constructor
     */
    redis?: Redis.RedisOptions;

    /**
     * When specified, the `Queue` will use this function to create new `ioredis` client connections.
     * This is useful if you want to re-use connections.
     */<commit_msg>fix RateLimiter<commit_after>// Type definitions for bull 3.3
// Project: https://github.com/OptimalBits/bull
// Definitions by: <NAME> <https://github.com/bgrieder>
//                 <NAME> <https://github.com/JProgrammer>
//                 <NAME> <https://github.com/marshall007>
//                 Weeco <https://github.com/weeco>
//                 <NAME> <https://github.com/blaugold>
//                 <NAME> <https://github.com/iamolegga>
//                 <NAME> <https://github.com/koblas>
//                 <NAME> <https://github.com/bondz>
//                 Wuha Team <https://github.com/wuha-team>
//                 <NAME> <https://github.com/aleccool213>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8

import * as Redis from "ioredis";
import * as Promise from "bluebird";

/**
 * This is the Queue constructor.
 * It creates a new Queue that is persisted in Redis.
 * Everytime the same queue is instantiated it tries to process all the old jobs that may exist from a previous unfinished session.
 */
declare const Bull: {
  (queueName: string, opts?: Bull.QueueOptions): Bull.Queue;
  (queueName: string, url?: string): Bull.Queue; // tslint:disable-line unified-signatures
  new (queueName: string, opts?: Bull.QueueOptions): Bull.Queue;
  new (queueName: string, url?: string): Bull.Queue; // tslint:disable-line unified-signatures
};

declare namespace Bull {
  interface RateLimiter {
    /** Max numbers of jobs processed */
    max?: number;
    /** Per duration in milliseconds */
    duration?: number;
    /** When jobs get rate limited, they stay in the waiting queue and are not moved to the delayed queue */
    bounceBack?: boolean;
  }

  interface QueueOptions {
    /**
     * Options passed directly to the `ioredis` constructor
     */
    redis?: Redis.RedisOptions;

    /**
     * When specified, the `Queue` will use this function to create new `ioredis` client connections.
     * This is useful if you want to re-use connections.
     */
{'fraction_non_alphanumeric': 0.1312770838643895, 'fraction_numerical': 0.0050981391791995925, 'mean_word_length': 2.557570262919311, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 39, 'https://': 24, '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': '5072279', 'n_tokens_mistral': 1160, 'n_tokens_neox': 1131, 'n_words': 350}