示例#1
0
def trigger_at_start(id):
    serverboards.debug(repr(("add", start_triggers, id)))
    assert id not in start_triggers
    start_triggers.add(id)
    serverboards.info("Just triggers a tick at start: %s" % id)
    serverboards.rpc.event("trigger", state="tick", id=id)
    return id
示例#2
0
def trigger_at_start(id):
    serverboards.debug(repr(("add", start_triggers, id)))
    assert id not in start_triggers
    start_triggers.add(id)
    serverboards.info("Just triggers a tick at start: %s" % id)
    serverboards.rpc.event("trigger", state="tick", id=id)
    return id
示例#3
0
def bad_protocol(*args):
    serverboards.debug("Invalid message")
    return True
示例#4
0
def abort(*args, **kwargs):
    serverboards.debug("Pretend to work")
    time.sleep(0.500)
    serverboards.debug("Aborting")
    sys.exit(1)
示例#5
0
def freepass(type="freepass", email="*****@*****.**", **kwargs):
    # use existing one, or fail
    serverboards.debug("Freepass for %s" % email)
    return email
示例#6
0
def stop_trigger_at_start(id):
    serverboards.debug(repr(("del", start_triggers, id)))
    assert id in start_triggers
    start_triggers.remove(id)
    serverboards.info("Stop start trigger: %s" % id)
    return True
示例#7
0
def auth_token(type="fake", token=None):
    serverboards.debug("Try auth by token: %s" % token)
    if token == "XXX":
        return '*****@*****.**'
    return False
示例#8
0
def bad_protocol(*args):
    serverboards.debug("Invalid message")
    return True
示例#9
0
def abort(*args, **kwargs):
    serverboards.debug("Pretend to work")
    time.sleep(0.500)
    serverboards.debug("Aborting")
    sys.exit(1)
示例#10
0
def freepass(type="freepass", email="*****@*****.**", **kwargs):
    # use existing one, or fail
    serverboards.debug("Freepass for %s" % email)
    return email
示例#11
0
def stop_trigger_at_start(id):
    serverboards.debug(repr(("del", start_triggers, id)))
    assert id in start_triggers
    start_triggers.remove(id)
    serverboards.info("Stop start trigger: %s" % id)
    return True
示例#12
0
def auth_token(type="fake", token=None):
    serverboards.debug("Try auth by token: %s" % token)
    if token == "XXX":
        return '*****@*****.**'
    return False