Browse Source

left work here

bugfixes
harshadyeola 10 years ago
parent
commit
f32909ae90
  1. 28
      ee/cli/plugins/debug.py

28
ee/cli/plugins/debug.py

@ -2,7 +2,7 @@
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 ee.core.shellexec import EEShellExec from ee.core.shellexec import *
from ee.core.mysql import EEMysql from ee.core.mysql import EEMysql
from ee.core.services import EEService from ee.core.services import EEService
from ee.core.logging import Log from ee.core.logging import Log
@ -491,15 +491,23 @@ class EEDebugController(CementBaseController):
cron_time = 5 cron_time = 5
try: try:
EEShellExec.cmd_exec(self, "/bin/bash -c \"crontab -l " if not EEShellExec.cmd_exec(self, "crontab -l | grep "
"2> /dev/null | {{ cat; echo -e" "'ee import-slow-log'"):
" \\\"#EasyEngine start MySQL " EEShellExec.cmd_exec(self, "/bin/bash -c \"crontab -l "
"slow log \\n*/{0} * * * * " "2> /dev/null | {{ cat; echo -e"
"/usr/local/bin/ee " " \\\"#EasyEngine start MySQL "
"import-slow-log\\n" "slow log \\n*/{0} * * * * "
"#EasyEngine end MySQL slow log" "/usr/local/bin/ee "
"\\\"; }} | crontab -\"" "import-slow-log\\n"
.format(cron_time)) "#EasyEngine end MySQL slow log"
"\\\"; }} | crontab -\""
.format(cron_time))
else:
EEShellExec.cmd_exec(self, "/bin/bash -c \"crontab -l "
" | sed 's/*ee import-slow-log*///'"
" | crontab -"
.format(cron_time))
except CommandExecutionError as e: except CommandExecutionError as e:
Log.debug(self, str(e)) Log.debug(self, str(e))

Loading…
Cancel
Save