Revert "Merge pull request #15593 from edx/efischer/edu-274_logging"
This reverts commit2d6b477e83, reversing changes made to7799c4adf4.
This commit is contained in:
@@ -7,7 +7,6 @@ import logging
|
||||
import re
|
||||
import json
|
||||
import datetime
|
||||
import traceback
|
||||
|
||||
from pytz import UTC
|
||||
from collections import defaultdict
|
||||
@@ -158,19 +157,7 @@ class ActiveBulkThread(threading.local):
|
||||
"""
|
||||
def __init__(self, bulk_ops_record_type, **kwargs):
|
||||
super(ActiveBulkThread, self).__init__(**kwargs)
|
||||
self._records = defaultdict(bulk_ops_record_type)
|
||||
self.CMS_LEAK_DEBUG_GLOBAL = True # only log once per process
|
||||
|
||||
@property
|
||||
def records(self):
|
||||
if self.CMS_LEAK_DEBUG_GLOBAL and len(self._records) > 2000: # arbitrary limit, we peak around ~2750 on edx.org
|
||||
log.info(
|
||||
"EDUCATOR-768: The memory leak issue may be in progress. How we got here:\n{}".format(
|
||||
"".join(traceback.format_stack())
|
||||
)
|
||||
)
|
||||
self.CMS_LEAK_DEBUG_GLOBAL = False
|
||||
return self._records
|
||||
self.records = defaultdict(bulk_ops_record_type)
|
||||
|
||||
|
||||
class BulkOperationsMixin(object):
|
||||
|
||||
Reference in New Issue
Block a user