How do I test a task using `.fn` that contains a c...
# ask-community
h
How do I test a task using
.fn
that contains a call to
get_run_logger
. I get a
RuntimeError: There is no active flow or task run context
exception
1
z
Hi! I believe there is an open issue for this. In the meantime, you can do
Copy code
def safe_get_run_logger():
   try:
      return get_run_logger()
   except RuntimeError:
       return logging.getLogger("my_logger")
1