Ë
    ¹ûàgr  ã                   ó6   — d dl Z d dlmZ d dlmZ d dlmZ d„ Zy)é    N)Úget_running_loop©Úwraps)ÚSynchronousOnlyOperationc                 ó@   ‡ — ˆ fd„}t        ‰ «      r‰ }dŠ  ||«      S |S )z•
    Decorator to mark functions as async-unsafe. Someone trying to access
    the function while in an async context will get an error message.
    c                 ó2   •‡ — t        ‰ «      ˆ ˆfd„«       }|S )Nc                  óœ   •— 	 t        «        t        j                  j                  d«      st	        ‰«      ‚ ‰| i |¤ŽS # t
        $ r Y Œw xY w)NÚDJANGO_ALLOW_ASYNC_UNSAFE)r   ÚosÚenvironÚgetr   ÚRuntimeError)ÚargsÚkwargsÚfuncÚmessages     €€úR/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/django/utils/asyncio.pyÚinnerz.async_unsafe.<locals>.decorator.<locals>.inner   sP   ø€ ð<Ü Ô"ô —z‘z—~‘~Ð&AÔBÜ2°7Ó;Ð;á˜Ð( Ñ(Ð(øô  ò Ùðús   ƒ
? ¿	AÁ
Ar   )r   r   r   s   ` €r   Ú	decoratorzasync_unsafe.<locals>.decorator   s    ù€ Ü	ˆt‹ô
	)ó 
ð
	)ð ˆó    zKYou cannot call this from an async context - use a thread or sync_to_async.)Úcallable)r   r   r   s   `  r   Úasync_unsafer      s3   ø€ ôô" �ÔØˆðð 	ñ ˜‹ÐàÐr   )r   Úasyncior   Ú	functoolsr   Údjango.core.exceptionsr   r   © r   r   ú<module>r      s   ðÛ 	Ý $Ý å ;ór   