Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class NotReadyError(Exception):
- """
- Custom exception signaling to the Step Function
- that it cannot move to the next state. Instead,
- the Retry block is triggered, pausing the process.
- You can pass details about the progress as a
- string when initializing it. It will be shown
- in the SF console.
- """
- pass
- def is_processing_done():
- """
- Function checking if whatever external work the
- pipeline is waiting on has finished already.
- """
- return False
- def main(event, context):
- if event.get('force'):
- return
- if not is_processing_done():
- raise NotReadyError()
Add Comment
Please, Sign In to add comment