Angular Modernizer
    Preparing search index...

    Singleton store for the progress of streaming operations (deprecated streaming path and get-operation-progress), with TTL-based cleanup: finished operations are deleted after 5 minutes, running ones are marked failed with a timeout event after 10.

    Call setResult(operationId, result) before markComplete(operationId): get-operation-progress returns result only for completed operations that have one.

    Index

    Methods

    • Cancel a running operation. No-op if already completed or cancelled.

      Parameters

      • operationId: string

      Returns void

    • Create a new operation

      Parameters

      Returns void

    • Delete operation (for cleanup)

      Parameters

      • operationId: string

      Returns void

    • Get all operation IDs

      Returns string[]

    • Get events for operation, optionally filtering by timestamp

      Parameters

      • operationId: string
      • OptionalsinceTimestamp: number

      Returns StreamingProgressEvent[]

    • Retrieve the stored result for an operation. Returns undefined if no result has been stored yet.

      Parameters

      • operationId: string

      Returns unknown

    • Get store statistics (for monitoring)

      Returns {
          cancelledOperations: number;
          completedOperations: number;
          failedOperations: number;
          runningOperations: number;
          totalOperations: number;
      }

      • cancelledOperations: number

        Operations with status 'cancelled'.

      • completedOperations: number

        Operations with status 'completed'.

      • failedOperations: number

        Operations with status 'failed'.

      • runningOperations: number

        Operations with status 'running'.

      • totalOperations: number

        Number of stored operations.

    • Check if operation exists

      Parameters

      • operationId: string

      Returns boolean

    • Returns true if the operation has been cancelled.

      Parameters

      • operationId: string

      Returns boolean

    • Mark operation as complete

      Parameters

      • operationId: string

      Returns void

    • Mark operation as failed

      Parameters

      • operationId: string
      • error: string

      Returns void

    • Store the final result of a completed operation (e.g. violations array). Must be called before markComplete so callers can retrieve it via get-operation-progress.

      Parameters

      • operationId: string
      • result: unknown

      Returns void

    • Reset singleton instance (for testing)

      Returns void