|
@@ -46,15 +46,14 @@ class Monitor(callback.CallBack): |
|
@@ -46,15 +46,14 @@ class Monitor(callback.CallBack): |
|
46
|
Config.set('host', self._socket.ws_url)
|
46
|
Config.set('host', self._socket.ws_url)
|
|
47
|
|
47
|
|
|
48
|
def go_login(self):
|
48
|
def go_login(self):
|
|
49
|
- threading.Thread(target=self._auto_login,args=()).start()
|
49
|
+ threading.Thread(target=self._auto_login, args=(), name='auto_login_thread').start()
|
|
50
|
|
50
|
|
|
51
|
def _auto_login(self):
|
51
|
def _auto_login(self):
|
|
52
|
user_list = UserList.query(status=Status.ONLINE)
|
52
|
user_list = UserList.query(status=Status.ONLINE)
|
|
53
|
for user in user_list:
|
53
|
for user in user_list:
|
|
54
|
print("自动登录->", user)
|
54
|
print("自动登录->", user)
|
|
55
|
self.login(user.email, user.password, user.format_cookie(), user.user_agent)
|
55
|
self.login(user.email, user.password, user.format_cookie(), user.user_agent)
|
|
56
|
- time.sleep(0.2)
|
|
|
|
57
|
-
|
56
|
+ time.sleep(0.3)
|
|
58
|
|
57
|
|
|
59
|
def _replace_call(self, client):
|
58
|
def _replace_call(self, client):
|
|
60
|
funcs = [x for x in dir(self) if x.startswith("on")]
|
59
|
funcs = [x for x in dir(self) if x.startswith("on")]
|