import threading
def run(action, duration=0, music=None, set_wait_id=None, **kwargs):
- if set_wait_id is not None:
- action.mapping.add_wait_id(set_wait_id, action)
+ action.mapping.add_wait(action, wait_id=set_wait_id)
action.sleep_event = threading.Event()
action.sleep_event_timer = threading.Timer(