Exemple #1
0
def mark_invoked(handler_id):
    """
    Record that the handler has been invoked, for use with only_once.
    """
    helpers.mark_invoked(handler_id)
 def wrapper(*args, **kwargs):
     action_id = _action_id(action)
     if not was_invoked(action_id):
         action(*args, **kwargs)
         mark_invoked(action_id)
 def wrapper(*args, **kwargs):
     action_id = _action_id(action)
     if not was_invoked(action_id):
         action(*args, **kwargs)
         mark_invoked(action_id)