Skip to content

Commit

Permalink
Fixes part of oppia#4374: Add docstring in core/domain/feedback_jobs_…
Browse files Browse the repository at this point in the history
…continuous.py (oppia#6006)

* Add docstring in core/domain/feedback_jobs_continuous.py
  • Loading branch information
vddesai1871 authored and DubeySandeep committed Dec 24, 2018
1 parent 156ff89 commit ef0bd13
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions core/domain/feedback_jobs_continuous.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def _handle_incoming_event(cls, active_realtime_layer, event_type, *args):
exp_id = args[0]

def _increment_open_threads_count():
"""Increments count of open threads by one."""
realtime_class = cls._get_realtime_datastore_class()
realtime_model_id = realtime_class.get_realtime_id(
active_realtime_layer, exp_id)
Expand All @@ -103,6 +104,7 @@ def _increment_open_threads_count():
model.put()

def _increment_total_threads_count():
"""Increments count of total threads by one."""
realtime_class = cls._get_realtime_datastore_class()
realtime_model_id = realtime_class.get_realtime_id(
active_realtime_layer, exp_id)
Expand All @@ -117,6 +119,7 @@ def _increment_total_threads_count():
model.put()

def _decrement_open_threads_count():
"""Decrements count of open threads by one."""
realtime_class = cls._get_realtime_datastore_class()
realtime_model_id = realtime_class.get_realtime_id(
active_realtime_layer, exp_id)
Expand Down Expand Up @@ -215,10 +218,22 @@ class FeedbackAnalyticsMRJobManager(

@classmethod
def _get_continuous_computation_class(cls):
"""Get class for continuous computaion that computes analytics
for feedback threads of explorations.
Returns:
type. Class for continuous computaion of analytics.
"""
return FeedbackAnalyticsAggregator

@classmethod
def entity_classes_to_map_over(cls):
"""Get the list of classes that this class maps over
Returns:
list(GeneralFeedbackThreadModel). List of classes of feedback
thread models.
"""
return [feedback_models.GeneralFeedbackThreadModel]

@staticmethod
Expand Down

0 comments on commit ef0bd13

Please sign in to comment.