diff --git a/cms/wsgi.py b/cms/wsgi.py index aa760d0..b46d824 100644 --- a/cms/wsgi.py +++ b/cms/wsgi.py @@ -6,9 +6,6 @@ defuse_xml_libs() import contracts contracts.disable_all() -import openedx.core.operations -openedx.core.operations.install_memory_dumper() - import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "cms.envs.aws") diff --git a/lms/wsgi.py b/lms/wsgi.py index 9ac8309..d71a2c2 100644 --- a/lms/wsgi.py +++ b/lms/wsgi.py @@ -16,9 +16,6 @@ defuse_xml_libs() import contracts contracts.disable_all() -import openedx.core.operations -openedx.core.operations.install_memory_dumper() - import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "lms.envs.aws") diff --git a/openedx/core/operations.py b/openedx/core/operations.py deleted file mode 100644 index 87721c8..0000000 --- a/openedx/core/operations.py +++ /dev/null @@ -1,40 +0,0 @@ -""" -Workflows useful for reporting on runtime characteristics of the system -""" -import gc -import os -import signal -import tempfile -from datetime import datetime - -from meliae import scanner - - -def dump_memory(signum, frame): - """ - Dump memory stats for the current process to a temp directory. - Uses the meliae output format. - """ - - timestamp = datetime.now().isoformat() - format_str = '{}/meliae.{}.{}.{{}}.dump'.format( - tempfile.gettempdir(), - timestamp, - os.getpid(), - ) - - scanner.dump_all_objects(format_str.format('pre-gc')) - - # force garbarge collection - for gen in xrange(3): - gc.collect(gen) - scanner.dump_all_objects( - format_str.format("gc-gen-{}".format(gen)) - ) - - -def install_memory_dumper(dump_signal=signal.SIGPROF): - """ - Install a signal handler on `signal` to dump memory stats for the current process. - """ - signal.signal(dump_signal, dump_memory) diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index 5371d24..66fdaa8 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -68,9 +68,6 @@ httpretty==0.8.3 lazy==1.1 mako==1.0.2 Markdown>=2.6,<2.7 ---allow-external meliae ---allow-unverified meliae -meliae==0.4.0 mongoengine==0.10.0 MySQL-python==1.2.5 networkx==1.7 diff --git a/requirements/edx/pre.txt b/requirements/edx/pre.txt index 2005ea1..2dd4a0f 100644 --- a/requirements/edx/pre.txt +++ b/requirements/edx/pre.txt @@ -12,6 +12,3 @@ pip==9.0.1 # Numpy and scipy can't be installed in the same pip run. # Install numpy before other things to help resolve the problem. numpy==1.6.2 - -# Needed for meliae -Cython==0.21.2