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
291945b6
Commit
291945b6
authored
Mar 14, 2017
by
David Ormsbee
Committed by
GitHub
Mar 14, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14686 from edx/ormsbee/test_startup_speed_monkeypatch_kombu
Test speedup: Monkey patch Kombu entrypoints fn.
parents
23c1ee32
294bbe7f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
cms/__init__.py
+11
-0
lms/__init__.py
+11
-0
No files found.
cms/__init__.py
View file @
291945b6
...
...
@@ -4,6 +4,17 @@ registration and discovery can work correctly.
"""
from
__future__
import
absolute_import
# We monkey patch Kombu's entrypoints listing because scanning through this
# accounts for the majority of LMS/Studio startup time for tests, and we don't
# use custom Kombu serializers (which is what this is for). Still, this is
# pretty evil, and should be taken out when we update Celery to the next version
# where it looks like this method of custom serialization has been removed.
#
# FWIW, this is identical behavior to what happens in Kombu if pkg_resources
# isn't available.
import
kombu.utils
kombu
.
utils
.
entrypoints
=
lambda
namespace
:
iter
([])
# This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
from
.celery
import
APP
as
CELERY_APP
lms/__init__.py
View file @
291945b6
...
...
@@ -4,6 +4,17 @@ registration and discovery can work correctly.
"""
from
__future__
import
absolute_import
# We monkey patch Kombu's entrypoints listing because scanning through this
# accounts for the majority of LMS/Studio startup time for tests, and we don't
# use custom Kombu serializers (which is what this is for). Still, this is
# pretty evil, and should be taken out when we update Celery to the next version
# where it looks like this method of custom serialization has been removed.
#
# FWIW, this is identical behavior to what happens in Kombu if pkg_resources
# isn't available.
import
kombu.utils
kombu
.
utils
.
entrypoints
=
lambda
namespace
:
iter
([])
# This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
from
.celery
import
APP
as
CELERY_APP
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