Mac Gréco Péralte Chéry
07/30/2020, 4:43 PM[2020-07-30 16:24:11] INFO - prefect.TaskRunner | Task 'Scraping Institution Data[0]': Starting task run...
I would like to have
[2020-07-30 16:24:11] INFO - prefect.TaskRunner | Task 'Scraping Institution Data[0] [hospital name]': Starting task run...
I think this would be great when you visualize the flow run in the UI to know by the task name for which hospital the web scrapping Failed. Whithout going the the logs
P.S Currently i am logging the Hospital name to know What hospital data is currently web-scraped
@task(name="Scraping Institution Data")
def scrape_institution_data(instActionIdTuple):
logger = prefect.context.get("logger")
<http://logger.info|logger.info>(f"Scraping for site: {instActionIdTuple[0]}")
So at runtime i get:
[2020-07-30 16:24:11] INFO - prefect.TaskRunner | Task 'Scraping Institution Data[0]': Starting task run...
[2020-07-30 16:24:11] INFO - prefect.Scraping Institution Data[0] | Scraping for site: Hôspital Claire Heureuse de Marchand Dessalines
itay livni
07/30/2020, 5:18 PMDylan
07/30/2020, 5:32 PMMac Gréco Péralte Chéry
07/30/2020, 5:42 PM