"""Notify that adjustment_file_import task started.""" from lib import constants from lib.utils import ows from tasks.adjustment_file_import import helpers def notify_started_task(dag_run, **kwargs): """Update specified action state's action_status to 'running'.""" event = helpers.get_event_from_params(dag_run, **kwargs) action_name = constants.STATEMENT_PERIOD_ADJUSTMENT_FILE_ACTIONS.IMPORT_FILE abacus_state = helpers.get_abacus_state(action_name, event.target_id) ows.update_abacus_state( abacus_state.get('abacus_state_id'), body={ 'action_status': constants.ABACUS_STATE_STATUSES.RUNNING } )