
    Tit                         U d dl mZmZmZ d dlZi Zeeej                  e   f   ed<   dedej                  e   ddfdZ	deddfdZ
dedeej                  e      fd	Zy)
    )DictOptionalAnyNstream_tasks
session_idtaskreturnc                     |t         | <   y)z
    Add a stream task for the given session_id.

    Args:
        session_id (str): Unique identifier for the session.
        task: The task object to associate with the session.
    N)r   )r   r   s     Q/home/jay/workspace/tools/ai-image-gen/jaaz-app/server/services/stream_service.pyadd_stream_taskr      s      $L    c                 0    t         j                  | d       y)z
    Remove the stream task associated with the given session_id.

    Args:
        session_id (str): Unique identifier for the session.
    N)r   popr   s    r   remove_stream_taskr      s     Z&r   c                 ,    t         j                  |       S )z
    Retrieve the stream task associated with the given session_id.

    Args:
        session_id (str): Unique identifier for the session.

    Returns:
        The task object if found, otherwise None.
    )r   getr   s    r   get_stream_taskr      s     J''r   )typingr   r   r   asyncior   strTask__annotations__r   r   r    r   r   <module>r      s    & &  .0d3S))* /$ $7<<+< $ $'3 '4 '
( 
(c1B(C 
(r   