Skip to content

Commit

Permalink
Add Prefect orchestration
Browse files Browse the repository at this point in the history
  • Loading branch information
rminnett committed Oct 17, 2024
1 parent c57d84c commit fb2b6e9
Show file tree
Hide file tree
Showing 5 changed files with 1,486 additions and 0 deletions.
1 change: 1 addition & 0 deletions pipeline/.python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12
11 changes: 11 additions & 0 deletions pipeline/flow.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from prefect import flow, get_run_logger


@flow
def my_flow():
logger = get_run_logger()
logger.info("Hello from ECS!!")


if __name__ == "__main__":
my_flow()
16 changes: 16 additions & 0 deletions pipeline/hello.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from prefect import flow


@flow(log_prints=True)
def hello_world(name: str = "world", goodbye: bool = False):
print(f"Hello {name} from Prefect! 🤗")

if goodbye:
print(f"Goodbye {name}!")


if __name__ == "__main__":
hello_world.serve(name="my-first-deployment",
tags=["onboarding"],
parameters={"goodbye": True},
interval=60)
10 changes: 10 additions & 0 deletions pipeline/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[project]
name = "pipeline"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"prefect-aws>=0.5.0",
"prefect>=3.0.2",
]
Loading

0 comments on commit fb2b6e9

Please sign in to comment.