HEX
Server: LiteSpeed
System: Linux php-prod-1.spaceapp.ru 5.15.0-157-generic #167-Ubuntu SMP Wed Sep 17 21:35:53 UTC 2025 x86_64
User: xnsbb3110 (1041)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //usr/local/CyberCP/lib/python3.10/site-packages/fastapi/__pycache__/background.cpython-310.pyc
o

�h��@sLddlmZmZddlmZddlmZmZm	Z	e	d�Z
Gdd�de�ZdS)�)�Any�Callable)�BackgroundTasks)�	Annotated�Doc�	ParamSpec�PcsJeZdZdZdeeeefed�fdej	dej
ddf�fdd	�Z�ZS)
raG
    A collection of background tasks that will be called after a response has been
    sent to the client.

    Read more about it in the
    [FastAPI docs for Background Tasks](https://fastapi.tiangolo.com/tutorial/background-tasks/).

    ## Example

    ```python
    from fastapi import BackgroundTasks, FastAPI

    app = FastAPI()


    def write_notification(email: str, message=""):
        with open("log.txt", mode="w") as email_file:
            content = f"notification for {email}: {message}"
            email_file.write(content)


    @app.post("/send-notification/{email}")
    async def send_notification(email: str, background_tasks: BackgroundTasks):
        background_tasks.add_task(write_notification, email, message="some notification")
        return {"message": "Notification sent in the background"}
    ```
    �funcz�
                The function to call after the response is sent.

                It can be a regular `def` function or an `async def` function.
                �args�kwargs�returnNcst�j|g|�Ri|��S)z�
        Add a function to be called in the background after the response is sent.

        Read more about it in the
        [FastAPI docs for Background Tasks](https://fastapi.tiangolo.com/tutorial/background-tasks/).
        )�super�add_task)�selfr	r
r��	__class__��E/usr/local/CyberCP/lib/python3.10/site-packages/fastapi/background.pyr&szBackgroundTasks.add_task)
�__name__�
__module__�__qualname__�__doc__rrrrrr
rr�
__classcell__rrrrr	s"
�����
��rN)�typingrr�starlette.backgroundr�StarletteBackgroundTasks�typing_extensionsrrrrrrrr�<module>s