Leonardo Rocha
07/20/2021, 5:59 PMKevin Kho
super().run()
. Not sure everything will hold well when you move to flow.register()
though.
Maybe you can just add your filter to the Prefect logger?Leonardo Rocha
07/20/2021, 6:11 PMclass My_Flow(prefect.Flow):
def __init__(self, name, schedule=None, **kwargs):
...
super(My_Flow, self).__init__(name, schedule, **kwargs)
def run(self, **kwargs):
...
with prefect.context(**context_kwargs):
return super(My_Flow, self).run(**kwargs)
def add_task(self, task: prefect.core.task.Task) -> prefect.core.task.Task:
task = super(My_Flow, self).add_task(task)
...
return task
Kevin Kho
Leonardo Rocha
07/20/2021, 6:21 PMKevin Kho
Leonardo Rocha
07/20/2021, 6:28 PM