Few code quality improvements
This commit is contained in:
@@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||||||
- MySQL configuration tuning
|
- MySQL configuration tuning
|
||||||
- Cronjob to optimize MySQL databases weekly
|
- Cronjob to optimize MySQL databases weekly
|
||||||
- WO-kernel systemd service to automatically apply kernel tweaks on server startup
|
- WO-kernel systemd service to automatically apply kernel tweaks on server startup
|
||||||
|
- Brotli configuration with only well compressible MIME types
|
||||||
|
|
||||||
#### Changed
|
#### Changed
|
||||||
|
|
||||||
|
|||||||
@@ -753,7 +753,7 @@ class WODebugController(CementBaseController):
|
|||||||
self.debug_fpm73()
|
self.debug_fpm73()
|
||||||
if self.app.pargs.mysql:
|
if self.app.pargs.mysql:
|
||||||
# MySQL debug will not work for remote MySQL
|
# MySQL debug will not work for remote MySQL
|
||||||
if WOVariables.wo_mysql_host is "localhost":
|
if WOVariables.wo_mysql_host == "localhost":
|
||||||
self.debug_mysql()
|
self.debug_mysql()
|
||||||
else:
|
else:
|
||||||
Log.warn(self, "Remote MySQL found, WordOps does not support "
|
Log.warn(self, "Remote MySQL found, WordOps does not support "
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
from cement.core.controller import CementBaseController, expose
|
from cement.core.controller import CementBaseController, expose
|
||||||
from cement.core import handler, hook
|
from cement.core import handler, hook
|
||||||
from wo.core.shellexec import WOShellExec
|
|
||||||
from wo.core.logging import Log
|
from wo.core.logging import Log
|
||||||
from wo.core.variables import WOVariables
|
|
||||||
import os
|
|
||||||
|
|
||||||
|
|
||||||
def wo_import_slow_log_hook(app):
|
def wo_import_slow_log_hook(app):
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
from cement.core.controller import CementBaseController, expose
|
from cement.core.controller import CementBaseController, expose
|
||||||
from cement.core import handler, hook
|
from cement.core import handler, hook
|
||||||
from wo.core.variables import WOVariables
|
|
||||||
from pynginxconfig import NginxConfig
|
from pynginxconfig import NginxConfig
|
||||||
from wo.core.aptget import WOAptGet
|
from wo.core.aptget import WOAptGet
|
||||||
from wo.core.shellexec import WOShellExec
|
from wo.core.shellexec import WOShellExec
|
||||||
@@ -279,7 +278,7 @@ class WOInfoController(CementBaseController):
|
|||||||
Log.error(self, "PHP 7.3 is not installed")
|
Log.error(self, "PHP 7.3 is not installed")
|
||||||
|
|
||||||
if self.app.pargs.mysql:
|
if self.app.pargs.mysql:
|
||||||
if WOShellExec.cmd_exec(self, "mysqladmin ping"):
|
if WOShellExec.cmd_exec(self, "/usr/bin/mysqladmin ping"):
|
||||||
self.info_mysql()
|
self.info_mysql()
|
||||||
else:
|
else:
|
||||||
Log.error(self, "MySQL is not installed")
|
Log.error(self, "MySQL is not installed")
|
||||||
|
|||||||
@@ -1,25 +1,23 @@
|
|||||||
from wo.cli.plugins.stack import WOStackController
|
|
||||||
from wo.core.fileutils import WOFileUtils
|
|
||||||
from wo.core.mysql import *
|
|
||||||
from wo.core.shellexec import WOShellExec, CommandExecutionError
|
|
||||||
from wo.core.sslutils import SSL
|
|
||||||
from wo.core.variables import WOVariables
|
|
||||||
from wo.cli.plugins.sitedb import *
|
|
||||||
from wo.core.aptget import WOAptGet
|
|
||||||
from wo.core.git import WOGit
|
|
||||||
from wo.core.logging import Log
|
|
||||||
from wo.core.sendmail import WOSendMail
|
|
||||||
from wo.core.services import WOService
|
|
||||||
import subprocess
|
|
||||||
from subprocess import CalledProcessError
|
|
||||||
import os
|
|
||||||
import random
|
|
||||||
import string
|
|
||||||
import sys
|
|
||||||
import getpass
|
import getpass
|
||||||
import glob
|
import glob
|
||||||
|
import os
|
||||||
|
import random
|
||||||
import re
|
import re
|
||||||
import platform
|
import string
|
||||||
|
import subprocess
|
||||||
|
from subprocess import CalledProcessError
|
||||||
|
|
||||||
|
from wo.cli.plugins.sitedb import *
|
||||||
|
from wo.cli.plugins.stack import WOStackController
|
||||||
|
from wo.core.aptget import WOAptGet
|
||||||
|
from wo.core.fileutils import WOFileUtils
|
||||||
|
from wo.core.git import WOGit
|
||||||
|
from wo.core.logging import Log
|
||||||
|
from wo.core.mysql import *
|
||||||
|
from wo.core.services import WOService
|
||||||
|
from wo.core.shellexec import CommandExecutionError, WOShellExec
|
||||||
|
from wo.core.sslutils import SSL
|
||||||
|
from wo.core.variables import WOVariables
|
||||||
|
|
||||||
|
|
||||||
class SiteError(Exception):
|
class SiteError(Exception):
|
||||||
|
|||||||
Reference in New Issue
Block a user