"""Notify run failed task method.""" from lib import constants from lib.utils import ows from tasks.accounting_run_calculate import helpers def status_error(dag_run, **kwargs): """Update accounting run status to 'Error'.""" event = helpers.get_event_from_params(dag_run, **kwargs) ows.update_accounting_run( event.target_id, accounting_run_status=constants.ACCOUNTING_RUN_STATUSES.ERROR ) raise ValueError('Matching failed')