Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
fa10274d
Commit
fa10274d
authored
Aug 01, 2014
by
Ben Patterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "bok-choy: check mysql the old way."
parent
61f9fe56
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
pavelib/utils/test/bokchoy_utils.py
+8
-4
No files found.
pavelib/utils/test/bokchoy_utils.py
View file @
fa10274d
...
@@ -5,6 +5,7 @@ import sys
...
@@ -5,6 +5,7 @@ import sys
import
os
import
os
import
time
import
time
import
httplib
import
httplib
import
subprocess
from
paver.easy
import
sh
from
paver.easy
import
sh
from
pavelib.utils.envs
import
Env
from
pavelib.utils.envs
import
Env
from
pavelib.utils.process
import
run_background_process
from
pavelib.utils.process
import
run_background_process
...
@@ -125,10 +126,13 @@ def is_mysql_running():
...
@@ -125,10 +126,13 @@ def is_mysql_running():
"""
"""
Returns True if mysql is running, False otherwise.
Returns True if mysql is running, False otherwise.
"""
"""
# We use the MySQL CLI client and capture its stderr
# We need to check whether or not mysql is running as a process
# If the client cannot connect successfully, stderr will be non-empty
# even if it is not daemonized.
output
=
os
.
popen
(
'status mysql 2>&1'
)
.
read
()
with
open
(
os
.
devnull
,
'w'
)
as
DEVNULL
:
return
output
.
startswith
(
"mysql start/running, process"
)
#pgrep returns the PID, which we send to /dev/null
returncode
=
subprocess
.
call
(
"pgrep mysqld"
,
stdout
=
DEVNULL
,
shell
=
True
)
return
returncode
==
0
def
clear_mongo
():
def
clear_mongo
():
"""
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment