Forráskód Böngészése

Update user_manager: hard code staff for testing

StrayWarrior 2 hete
szülő
commit
262e75eaa1
1 módosított fájl, 3 hozzáadás és 2 törlés
  1. 3 2
      user_manager.py

+ 3 - 2
user_manager.py

@@ -169,7 +169,8 @@ class MySQLUserRelationManager(UserRelationManager):
         return []
 
     def list_staff_users(self):
-        sql = f"SELECT third_party_user_id, wxid FROM {self.agent_staff_table} WHERE status = 1"
+        sql = (f"SELECT third_party_user_id, wxid FROM {self.agent_staff_table} WHERE status = 1"
+               f" AND third_party_user_id = '1688854492669990'")
         agent_staff_data = self.agent_db.select(sql, pymysql.cursors.DictCursor)
         if not agent_staff_data:
             return []
@@ -191,7 +192,7 @@ class MySQLUserRelationManager(UserRelationManager):
             sql = f"SELECT union_id FROM {self.user_table} WHERE id IN {str(user_ids)} AND union_id is not null"
             user_data = self.wecom_db.select(sql, pymysql.cursors.DictCursor)
             if not user_data:
-                logging.error(f"staff[{wxid}] users not found in wecom database")
+                logging.warning(f"staff[{wxid}] users not found in wecom database")
                 continue
             user_union_ids = tuple(user['union_id'] for user in user_data)
             batch_size = 100