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
7d22d48e
Commit
7d22d48e
authored
Mar 21, 2013
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disable the discussion cache update signal until we get solution for pickling
parent
a5845a20
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
+4
-1
common/djangoapps/cache_toolbox/discussion_cache.py
+4
-1
No files found.
common/djangoapps/cache_toolbox/discussion_cache.py
View file @
7d22d48e
...
...
@@ -25,13 +25,15 @@ def get_discussion_cache_entry(modulestore, course_id):
def
generate_discussion_cache_entry
(
modulestore
,
course_id
):
# make this a NOP for now. We have to figure out how to pickle the result set
return
components
=
course_id
.
split
(
'/'
)
all_discussion_modules
=
modulestore
.
get_items
([
'i4x'
,
components
[
0
],
components
[
1
],
'discussion'
,
None
],
course_id
=
course_id
)
cache
=
_get_discussion_cache
()
entry
=
{
'modules'
:
all_discussion_modules
,
'timestamp'
:
datetime
.
now
()}
logging
.
debug
(
'**** entry = {0}'
.
format
(
entry
))
if
cache
is
not
None
:
cache
.
set
(
get_discussion_cache_key
(
course_id
),
entry
)
return
entry
...
...
@@ -40,6 +42,7 @@ def generate_discussion_cache_entry(modulestore, course_id):
def
modulestore_update_signal_handler
(
modulestore
=
None
,
course_id
=
None
,
location
=
None
,
**
kwargs
):
"""called when there is an write event in our modulestore
"""
return
if
location
.
category
==
'discussion'
:
logging
.
debug
(
'******* got modulestore update signal. Regenerating discussion cache for {0}'
.
format
(
course_id
))
# refresh the cache entry if we've changed a discussion module
...
...
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