Skip to content

Commit

Permalink
flow for testing retries
Browse files Browse the repository at this point in the history
  • Loading branch information
kevingrismore committed Dec 6, 2023
1 parent 2146184 commit a76be5c
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
13 changes: 13 additions & 0 deletions prefect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,16 @@ deployments:
work_queue_name: default
job_variables:
image: "{{ build-image.image }}"

- name: retry-test
version:
tags: []
description:
schedule:
entrypoint: retry_flow.py:testing_retries
parameters: {}
work_pool:
name: cloud-run-v2-pool
work_queue_name: default
job_variables:
image: "{{ build-image.image }}"
21 changes: 21 additions & 0 deletions retry_flow.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from prefect import flow, task


@flow
def testing_retries():
successful_task()
failing_task()


@task
def successful_task():
print("good")


@task
def failing_task():
raise Exception("bad")


if __name__ == "__main__":
testing_retries()

0 comments on commit a76be5c

Please sign in to comment.