top | item 37174766

(no title)

sasmithjr | 2 years ago

It's possible that you could end up with your example as given, but I think you could organize it differently so that it has your handling while also maintaining the same basic top-level pipeline.

Given what you've specified, I might organize it like:

  notify-user:
    if (ValidationError, notify-user-validation-error)
    or-if (DBError, notify-user-db-error)

  try-update-db:
    update-db
    or-then retry-in-5
    or-then retry-remote

  try-send-email:
    send-email
    or-then (requeue-email and ok)

  do-root-level-pipeline:
    validate
    and-then try-update-db
    and-then try-send-email
    or-then notify-user
I think I correctly mapped the and/or/thens to map/bind, so I hope that makes sense.

discuss

order

No comments yet.