Skip to content

Commit

Permalink
prefect
Browse files Browse the repository at this point in the history
  • Loading branch information
sgbaird committed Apr 6, 2024
1 parent 417fe38 commit 84c6e33
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
11 changes: 11 additions & 0 deletions scripts/prefect/create_pause_deployment.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from prefect import flow

if __name__ == "__main__":
flow.from_source(
source="https://github.com/AccelerationConsortium/ac-training-lab.git",
entrypoint="scripts/prefect/my_gh_pause_workflow.py:repo_info",
).deploy(
name="pause-workflow-deployment",
work_pool_name="my-managed-pool",
cron="0 1 * * *",
)
10 changes: 10 additions & 0 deletions scripts/prefect/my_gh_pause_workflow.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from prefect import flow, get_run_logger, pause_flow_run


@flow
def greet_user():
logger = get_run_logger()

user = pause_flow_run(wait_for_input=str)

logger.info(f"Hello, {user}!")

0 comments on commit 84c6e33

Please sign in to comment.