Fake Mirrors
    Preparing search index...

    Class BullAnalyzeQueue

    Bull-based analyze queue implementation.

    Depends:

    import { DIContainer } from '@famir/common'
    import { BullAnalyzeQueue } from '@famir/producer'

    // Get container singleton
    const container = DIContainer.getInstance()

    // Register dependency in container
    BullAnalyzeQueue.register(container)
    import { DIContainer } from '@famir/common'
    import { ANALYZE_QUEUE, AnalyzeQueue } from '@famir/domain'

    // Get container singleton
    const container = DIContainer.getInstance()

    // Resolve dependency from container
    const analyzeQueue = container.resolve<AnalyzeQueue>(ANALYZE_QUEUE)

    // TODO more examples

    Hierarchy (View Summary)

    Implements

    • Adds a new job to the analyze queue.

      Parameters

      • name: string

        The name of the job to be added.

      • data: AnalyzeJobData

        The arbitrary data to append to the job.

      Returns Promise<void>

      ProducerError If adding job fails.

    • Gracefully closes the queue.

      This method should be called during application shutdown.

      Returns Promise<void>

      LifecycleError If the queue cannot be closed properly.

    • Retrieves the total number of jobs in the queue.

      Returns Promise<number>

      The total job count.

      ProducerError If the count cannot be retrieved.

    • Retrieves the workers for the queue.

      Returns Promise<object[]>

      The queue workers list.

      ProducerError If the workers cannot be retrieved.

    • Registers the analyze queue as a singleton in the DI container.

      Parameters

      • container: DIContainer

        The DI container to register in.

      Returns void