REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 1.40 KB
Close
//proc/thread-self/root/opt/cloudlinux/venv/lib/python3.11/site-packages/lvestats/utils/dbmigrator/dbgovernor_config.py
Text
Base64
# coding=utf-8 # # Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2019 All Rights Reserved # # Licensed under CLOUD LINUX LICENSE AGREEMENT # http://cloudlinux.com/docs/LICENSE.TXT import argparse from xml.dom import minidom, DOMException, NotFoundErr from xml.parsers.expat import ExpatError def set_governor_save_uid(config_path="/etc/container/mysql-governor.xml", save_uid=True): """ :param str config_path: :param bool save_uid: :return: """ try: governor_config = minidom.parse(config_path) except (IOError, ExpatError, DOMException): pass else: try: if save_uid: governor_config.getElementsByTagName("statistic")[0].setAttribute("save_uid", "On") else: governor_config.getElementsByTagName("statistic")[0].removeAttribute("save_uid") except (NotFoundErr, IndexError, KeyError): pass else: with open(config_path, 'w', encoding='utf-8') as config_file: governor_config.writexml(config_file) if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument( '--save_uid', action='store_true', dest='save_uid', default=False) opts = parser.parse_args() if opts.save_uid: set_governor_save_uid(save_uid=True) else: set_governor_save_uid(save_uid=False)
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 2 × Files: 8
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
versions
DIR
-
drwxr-xr-x
2026-03-05 22:36:53
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__pycache__
DIR
-
drwxr-xr-x
2026-03-05 22:36:53
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
alembic.ini
1.48 KB
lrw-r--r--
2026-02-17 11:00:05
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
dbgovernor_config.py
1.40 KB
lrw-r--r--
2026-02-17 11:00:05
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
dbmigrate.py
752 B
lrw-r--r--
2026-02-17 11:00:05
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
dbmigrate_lib.py
3.11 KB
lrw-r--r--
2026-02-17 11:00:05
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
env.py
2.50 KB
lrw-r--r--
2026-02-17 11:00:05
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
script.py.mako
693 B
lrw-r--r--
2026-02-17 11:00:05
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
trash_cleaner.py
771 B
lrw-r--r--
2026-02-17 11:00:05
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__init__.py
294 B
lrw-r--r--
2026-02-17 11:00:05
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).