@name 批量同步数据库到服务器
(self, get)
| 1143 | |
| 1144 | # 2024/12/20 11:20 批量同步数据库到服务器 |
| 1145 | def batch_sync_db_to_server(self, get): |
| 1146 | ''' |
| 1147 | @name 批量同步数据库到服务器 |
| 1148 | ''' |
| 1149 | check_parm = self.check_db_parm(get) |
| 1150 | if not check_parm["status"]: return check_parm |
| 1151 | |
| 1152 | get.type = 1 |
| 1153 | |
| 1154 | if get.all == 0: |
| 1155 | get.ids = [] |
| 1156 | for db in get.database_list: |
| 1157 | get.ids.append(db["id"]) |
| 1158 | else: |
| 1159 | get.ids = [] |
| 1160 | all_dbs_info = public.M('databases').field('id,name').select() |
| 1161 | for db in all_dbs_info: |
| 1162 | if not db: continue |
| 1163 | if db["id"] in get.exclude_ids: continue |
| 1164 | |
| 1165 | get.ids.append(db["id"]) |
| 1166 | |
| 1167 | get.ids = json.dumps(get.ids) |
| 1168 | import database |
| 1169 | db_obj = database.database() |
| 1170 | return db_obj.SyncToDatabases(get) |
| 1171 | |
| 1172 | # 2024/12/20 11:28 批量备份mysql数据库 |
| 1173 | def batch_backup_mysql(self, get): |
nothing calls this directly
no test coverage detected