Пример #1
0
 def execute(self, **kwargs):
     targets = [self.next_action]
     parameter_status, parameter_timeout, action, parameters = \
         get_parameter(state=self, targets=targets)
     status_code, state_flag = after_get_parameter(parameter_status,
                                                   parameter_timeout,
                                                   action)
     self.parameters.update(parameters)
     if not state_flag:
         self.state_flag = 'UnderLoginVerifyRequest'
     else:
         self.state_flag = state_flag
     self.execute_status = status_code['status']
     self.execute_message = status_code['message']
     self.log()
Пример #2
0
 def execute(self, **kwargs):
     send_target = 'Get{}'.format(self.login_verify_type)
     targets = [self.next_action, send_target]
     parameter_status, parameter_timeout, action, parameters = \
         get_parameter(state=self, targets=targets)
     status_code, state_flag = after_get_parameter(parameter_status,
                                                   parameter_timeout,
                                                   action)
     self.parameters.update(parameters)
     if not state_flag:
         if action == send_target:
             self.state_flag = 'UnderLoginVerifyRequest'
         else:
             self.state_flag = 'UnderLogin'
     else:
         self.state_flag = state_flag
     self.execute_status = status_code['status']
     self.execute_message = status_code['message']
     self.log()
Пример #3
0
 def execute(self, **kwargs):
     targets = [self.next_action, "Login"]
     parameter_status, parameter_timeout, action, parameters = \
         get_parameter(state=self, targets=targets)
     status_code, state_flag = after_get_parameter(parameter_status,
                                                   parameter_timeout,
                                                   action)
     self.parameters.update(parameters)
     if not state_flag:
         if "Login" == action:
             self.state_flag = 'WaitVerifyRequest'
         else:
             if self.wait_code_get_login == True:
                 self.state_flag = 'WaitCode'
             else:
                 self.state_flag = 'UnderVerifyRequest'
     else:
         self.state_flag = state_flag
     self.execute_status = status_code['status']
     self.execute_message = status_code['message']
     self.log()
 def execute(self, **kwargs):
     targets = [self.next_step]
     for verify_type in self.need_verify_request:
         send_target = 'Get{}'.format(verify_type)
         targets.append(send_target)
     parameter_status, parameter_timeout, action, parameters = \
         get_parameter(sid=self.sid, targets=targets)
     status_code, state_flag = after_get_parameter(parameter_status,
                                                   parameter_timeout,
                                                   action)
     if not state_flag:
         self.parameters.update(parameters)
         if action == self.next_step:
             self.state_flag = 'UnderLogin'
         else:
             self.now_verify_request = action.remove('Get')
             self.state_flag = 'UnderLoginVerifyRequest'
     else:
         self.state_flag = state_flag
     self.execute_status = status_code['status']
     self.execute_message = status_code['message']
     message = generate_log_data(self, extend_log_func)
     logger.info(message)
Пример #5
0
 def execute(self, **kwargs):
     send_target = 'Get{}'.format(self.verify_type)
     targets = [self.next_action, send_target, 'Login']
     parameter_status, parameter_timeout, action, parameters = \
         get_parameter(state=self, targets=targets)
     self.parameters.update(parameters)
     status_code, state_flag = after_get_parameter(parameter_status,
                                                   parameter_timeout,
                                                   action)
     if not state_flag:
         if action == send_target:
             self.state_flag = 'UnderVerifyRequest'
             # self.state_flag = 'WaitVerifyRequest'
         elif "Login" == action:
             self.state_flag = 'WaitVerifyRequest'
             self.wait_code_get_login = True
         else:
             self.state_flag = 'UnderVerify'
     else:
         self.state_flag = state_flag
     self.execute_status = status_code['status']
     self.execute_message = status_code['message']
     self.log()