Hi,Below is my state handler snippet, i am getting...
# ask-community
s
Hi,Below is my state handler snippet, i am getting error
'Running' object has no attribute 'is_success'
,can someone help.
Copy code
def post_to_cw(obj, old_state, new_state):
    if new_state.is_failed():
        cloudwatch.put_metrics(cid=CID, flow_name=FLOW_NAME, status_code=1)
    if new_state.is_success():
        cloudwatch.put_metrics(cid=CID, flow_name=FLOW_NAME, status_code=0)
    return new_state
*is_successful*() seems i have to use this
k
You got this working?
s
Yes