Ejemplo n.º 1
0
def login_verify_get():
    act = db.act_get('login_verify_get', 'request')
    if act is None:
        return
    solved = False
    for p in procedures:
        if p.act['uid'] == act['uid']:
            p.get_verify_code(act['message'])
            db.act_set_state(act['id'], 'done', act['result'])
            solved = True
            break
    if not solved:
        db.act_set_state(act['id'], 'fail', 'procedure not exist.')
Ejemplo n.º 2
0
 def set_state(self, state, result):
     db.act_set_state(self.act['id'], state, result)
     self.act['state'] = state
     self.act['result'] = result
Ejemplo n.º 3
0
 def set_state(self, state, result):
     if self.act['id'] != 'fake_validate':
         db.act_set_state(self.act['id'], state, result)
     self.act['state'] = state
     self.act['result'] = result
Ejemplo n.º 4
0
def process_request():
    act = db.act_get('update', 'request')
    if act is None:
        return
    db.act_set_state(act['id'], 'process', act['result'])
    procedures.append(update_procedure.UpdateProcedure(act))
Ejemplo n.º 5
0
def login_request():
    act = db.act_get('login', 'request')
    if act is None:
        return
    db.act_set_state(act['id'], 'process', act['result'])
    procedures.append(action_process.login.login_procedure.LoginProcedure(act))