Browse Source

left work here

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

10
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,6 +491,8 @@ class EEDebugController(CementBaseController):
cron_time = 5 cron_time = 5
try: try:
if not EEShellExec.cmd_exec(self, "crontab -l | grep "
"'ee import-slow-log'"):
EEShellExec.cmd_exec(self, "/bin/bash -c \"crontab -l " EEShellExec.cmd_exec(self, "/bin/bash -c \"crontab -l "
"2> /dev/null | {{ cat; echo -e" "2> /dev/null | {{ cat; echo -e"
" \\\"#EasyEngine start MySQL " " \\\"#EasyEngine start MySQL "
@ -500,6 +502,12 @@ class EEDebugController(CementBaseController):
"#EasyEngine end MySQL slow log" "#EasyEngine end MySQL slow log"
"\\\"; }} | crontab -\"" "\\\"; }} | crontab -\""
.format(cron_time)) .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