Created
June 14, 2022 09:27
-
-
Save alexeygrigorev/562fc49fcb0f6e75f3770804172ddc50 to your computer and use it in GitHub Desktop.
Prefect test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
from prefect import task, flow | |
from prefect import get_run_logger | |
@task | |
def hello_task(date): | |
logger = get_run_logger() | |
logger.info("INFO level log message.") | |
logger.info(f'date={date}') | |
return date | |
@flow | |
def hello_flow(date): | |
logger = get_run_logger() | |
result = hello_task(date) | |
logger.info(f'result={result}') | |
hello_flow(datetime.now()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment