Created
August 2, 2022 20:06
-
-
Save discdiver/795a0bd0d6570edfde010f5da38f8885 to your computer and use it in GitHub Desktop.
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
Wrote {'data': 42, 'message': 'Super Special Message'} to database successfully! | |
Or | |
--------------------------------------------------------------------------- | |
Exception Traceback (most recent call last) | |
/Users/jeffhale/Desktop/prefect/prefect-101/p101.ipynb Cell 5 in <cell line: 1>() | |
----> 1 pipeline1(msg="Super Special Message") | |
/Users/jeffhale/Desktop/prefect/prefect-101/p101.ipynb Cell 5 in pipeline1(msg) | |
19 def pipeline1(msg: str): | |
---> 20 api_result = call_unreliable_api() | |
21 augmented_data = augment_data(data=api_result, msg=msg) | |
22 write_results_to_database(augmented_data) | |
/Users/jeffhale/Desktop/prefect/prefect-101/p101.ipynb Cell 5 in call_unreliable_api() | |
6 res = random.choice(choices) | |
7 if res == "failure": | |
----> 8 raise Exception("Our unreliable service failed") | |
9 else: | |
10 return res | |
Exception: Our unreliable service failed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment