Files
edx-platform/openedx/core/djangoapps/coursegraph/signals.py
Adam Palay da58ad2a2b only dump courses to neo4j if they've been updated since the last time they were dumped
improvements to the command line interface for caching
2016-10-11 08:20:23 -04:00

16 lines
510 B
Python

"""
Signal handlers for the CourseGraph application
"""
from django.dispatch.dispatcher import receiver
from xmodule.modulestore.django import SignalHandler
from openedx.core.djangoapps.coursegraph.utils import CourseLastPublishedCache
@receiver(SignalHandler.course_published)
def _listen_for_course_publish(sender, course_key, **kwargs): # pylint: disable=unused-argument
"""
Register when the course was published on a course publish event
"""
CourseLastPublishedCache().set(course_key)