kulkarni-sp commented on PR #44646:
URL: https://github.com/apache/airflow/pull/44646#issuecomment-2592834933

   @potiuk We have also applied this patch, Requires minor change for it to 
work in multithreaded env i.e. getattr check and initialization should be done 
before sentinel check OR It could work with is PR 
[](https://github.com/apache/airflow/pull/44240/files)
   
   
   @classmethod
       def decorator(cls, func):
           @wraps(func)
           def wrapper(self, *args, **kwargs):
               from airflow.decorators.base import DecoratedOperator
   
               sentinel_key = f"{self.__class__.__name__}__sentinel"
               sentinel = kwargs.pop(sentinel_key, None)
               **if not getattr(cls._sentinel, "callers", None):
                   cls._sentinel.callers = {}**
               if sentinel:                
                   cls._sentinel.callers[sentinel_key] = sentinel
               else:                
                   sentinel = 
cls._sentinel.callers.pop(f"{func.__qualname__.split('.')[0]}__sentinel", None)
               ----


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to