Comment 7 for bug 1636923

Revision history for this message
Mike Rylander (mrylander) wrote :

While it's true that you can't use a global A/T definition when some libraries don't want it, that's simply how A/T is designed. A library adds what they need, rather than setting exceptions where they don't want something. The traditional way around this is to have a disabled global definition that you clone as needed. Cloning a definition is really no more difficult than setting a YAOUS, and has the benefit of local customization. Which leads to the second point ...

I can see three ways to manage a notification on failure:
 1) We could create a complex reactor is set up such that its logic just takes different paths depending on whether the renewal succeeds or fails, with the "success" path being "great, we're done here" and the "fail" path being "process the template and send it as email," then you'd probably want the ability to locally customize the template anyway.
 2) We could have the reactor trigger another hook ('circ.autorenew.failed', maybe) to be processed later, and each library could choose if and what to send on renewal failure, allowing customization.
 3) We could just use the Cleanup stage to process the definition's template and send a notification on failure. This is like (2) but without the extra event, and is locally customizable if it's not a global definition.

I prefer (3) with (2) as a second choice. I'm not a fan of overly complex reactors because doing to much in a reactor is bad for both bugs and cross-site usefulness (different strokes for different folks).