def METHOD_NAME(fn):
    """
    ~~CaptureSigterm:Feature~~
    Decorator which allows graceful exit on SIGTERM
    """
    # Register the SIGTERM handler to raise an exception, allowing graceful exit.
    signal.signal(signal.SIGTERM, _term_handler)
    @wraps(fn)
    def decorated_fn(*args, **kwargs):
        try:
            fn(*args, **kwargs)
        except (CaughtTermException, KeyboardInterrupt):
            app.logger.warning(u"Harvester caught SIGTERM. Exiting.")
            report = Report.write_report()
            if app.config.get("HARVESTER_EMAIL_ON_EVENT", False):
                to = app.config.get("HARVESTER_EMAIL_RECIPIENTS", None)
                fro = app.config.get("SYSTEM_EMAIL_FROM")
                if to is not None:
                    from portality import app_email as mail
                    mail.send_mail(
                        to=to,
                        fro=fro,
                        subject="DOAJ Harvester caught SIGTERM at {0}".format(dates.now_str()),
                        msg_body=report
                    )
            app.logger.info(report)
            exit(1)
    return decorated_f