Module Expr Str ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign TupleStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr ListLoad AttributeLoad AttributeLoad NameLoad attr attr ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Pass decorator_list NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore ListLoad NameLoad FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr NameLoad Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr body Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Dict Str Str Num Num decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr body Assign NameStore Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Dict Str Str Num Num decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr body Assign NameStore Str Assign NameStore Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Dict Str Str Num Num decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr body Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Dict Str Str Num Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Dict Str Str Num Num decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr body Assign NameStore Str Assign NameStore Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Dict Str Str Num Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Dict Str Str Num Num decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr body Assign NameStore Str Assign NameStore Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Dict Str Str Num Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Dict Str Str Num Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Dict Str Str Num Num decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr body Assign NameStore Str Assign NameStore Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Dict Str Str Num Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Dict Str Str Num Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Dict Str Str Num Num decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore ListLoad NameLoad FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr NameLoad Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr body Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Dict Str Str Num Num decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr body Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Str NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Dict Str Str Num Num decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr body Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Str NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Str NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Dict Str Str Num Num decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr body Assign NameStore Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Str NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Str NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Str NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Str NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Dict Str Str Num Num Expr Call AttributeLoad NameLoad attr NameLoad Dict Str Str Num Num decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr body Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Str NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Dict Str Str Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Num attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Str AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Dict Str Str Num Num decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr body Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Str NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Dict Str Str Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Num attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Str AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Dict Str Str Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Num attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Str AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Dict Str Str Num Num decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr body Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Str NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Dict Str Str Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Num attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Str AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Dict Str Str Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Num attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Str AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Dict Str Str Num Num decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr body Assign NameStore Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Str NameLoad Str Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad Dict Str Str Num Num Expr Call AttributeLoad NameLoad attr NameLoad Str NameLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad Dict Str Str Num Num decorator_list decorator_list
N/A N/A Tests for continuous computations relating to feedback analytics. core jobs_registry core.domain feedback_jobs_continuous core.domain feedback_services core.platform models core.tests test_utils N/A N/A feedback_models N/A N/A N/A models Registry import_models N/A N/A N/A models NAMES feedback ModifiedFeedbackAnalyticsAggregator N/A N/A feedback_jobs_continuous FeedbackAnalyticsAggregator N/A N/A A modified FeedbackAnalyticsAggregator that does not start a new batch
    job when the previous one has finished.
     _get_batch_job_manager_class N/A N/A cls N/A N/A N/A ModifiedFeedbackAnalyticsMRJobManager N/A classmethod _kickoff_batch_job_after_previous_one_ends N/A N/A cls N/A N/A N/A N/A classmethod N/A ModifiedFeedbackAnalyticsMRJobManager N/A N/A feedback_jobs_continuous FeedbackAnalyticsMRJobManager N/A _get_continuous_computation_class N/A N/A cls N/A N/A N/A ModifiedFeedbackAnalyticsAggregator N/A classmethod N/A FeedbackAnalyticsAggregatorUnitTests N/A N/A test_utils GenericTestBase N/A N/A Tests for statistics aggregations.
    Note: We are testing realtime model and MR job separately because in the
    test environment the realtime datastore is not automatically cleared after
    a batch job completes.
     N/A ALL_CC_MANAGERS_FOR_TESTS N/A ModifiedFeedbackAnalyticsAggregator _get_swap_context N/A N/A self N/A N/A N/A N/A N/A self swap jobs_registry ALL_CONTINUOUS_COMPUTATION_MANAGERS N/A self ALL_CC_MANAGERS_FOR_TESTS N/A _run_job_and_check_results N/A N/A self exp_id expected_thread_analytics_dict N/A N/A N/A N/A N/A self process_and_flush_pending_tasks N/A N/A N/A ModifiedFeedbackAnalyticsAggregator start_computation N/A N/A N/A self assertEqual N/A N/A self count_jobs_in_taskqueue 1 N/A N/A N/A self process_and_flush_pending_tasks N/A N/A N/A self assertEqual N/A N/A N/A N/A ModifiedFeedbackAnalyticsAggregator get_thread_analytics exp_id to_dict expected_thread_analytics_dict N/A test_no_threads N/A N/A self N/A N/A N/A N/A N/A self _get_swap_context N/A N/A exp_id eid N/A N/A N/A self save_new_valid_exploration exp_id owner N/A N/A N/A self _run_job_and_check_results exp_id N/A num_open_threads num_total_threads 0 0 N/A test_single_thread_single_exp N/A N/A self N/A N/A N/A N/A N/A self _get_swap_context N/A N/A exp_id eid N/A thread_id tid N/A N/A N/A self save_new_valid_exploration exp_id owner N/A thread N/A N/A N/A feedback_models FeedbackThreadModel create exp_id thread_id N/A N/A thread exploration_id exp_id N/A N/A N/A thread put N/A N/A N/A self _run_job_and_check_results exp_id N/A num_open_threads num_total_threads 1 1 N/A test_multiple_threads_single_exp N/A N/A self N/A N/A N/A N/A N/A self _get_swap_context N/A N/A exp_id eid N/A thread_id_1 tid1 N/A thread_id_2 tid2 N/A N/A N/A self save_new_valid_exploration exp_id owner N/A thread_1 N/A N/A N/A feedback_models FeedbackThreadModel create exp_id thread_id_1 N/A N/A thread_1 exploration_id exp_id N/A N/A N/A thread_1 put N/A thread_2 N/A N/A N/A feedback_models FeedbackThreadModel create exp_id thread_id_2 N/A N/A thread_2 exploration_id exp_id N/A N/A N/A thread_2 put N/A N/A N/A self _run_job_and_check_results exp_id N/A num_open_threads num_total_threads 2 2 N/A test_multiple_threads_multiple_exp N/A N/A self N/A N/A N/A N/A N/A self _get_swap_context N/A N/A exp_id_1 eid1 N/A exp_id_2 eid2 N/A thread_id_1 tid1 N/A thread_id_2 tid2 N/A thread_id_3 tid3 N/A thread_id_4 tid4 N/A N/A N/A self save_new_valid_exploration exp_id_1 owner N/A N/A N/A self save_new_valid_exploration exp_id_2 owner N/A thread_1 N/A N/A N/A feedback_models FeedbackThreadModel create exp_id_1 thread_id_1 N/A N/A thread_1 exploration_id exp_id_1 N/A N/A N/A thread_1 put N/A thread_2 N/A N/A N/A feedback_models FeedbackThreadModel create exp_id_1 thread_id_2 N/A N/A thread_2 exploration_id exp_id_1 N/A N/A N/A thread_2 put N/A thread_3 N/A N/A N/A feedback_models FeedbackThreadModel create exp_id_2 thread_id_3 N/A N/A thread_3 exploration_id exp_id_2 N/A N/A N/A thread_3 put N/A thread_4 N/A N/A N/A feedback_models FeedbackThreadModel create exp_id_2 thread_id_4 N/A N/A thread_4 exploration_id exp_id_2 N/A N/A N/A thread_4 put N/A N/A N/A self process_and_flush_pending_tasks N/A N/A N/A ModifiedFeedbackAnalyticsAggregator start_computation N/A N/A N/A self assertEqual N/A N/A self count_jobs_in_taskqueue 1 N/A N/A N/A self process_and_flush_pending_tasks N/A N/A N/A self assertEqual N/A N/A N/A N/A ModifiedFeedbackAnalyticsAggregator get_thread_analytics exp_id_1 to_dict N/A num_open_threads num_total_threads 2 2 N/A N/A N/A self assertEqual N/A N/A N/A N/A ModifiedFeedbackAnalyticsAggregator get_thread_analytics exp_id_2 to_dict N/A num_open_threads num_total_threads 2 2 N/A test_thread_closed_job_running N/A N/A self N/A N/A N/A N/A N/A self _get_swap_context N/A N/A user_id uid N/A exp_id eid N/A thread_id_1 tid1 N/A N/A N/A self save_new_valid_exploration exp_id owner N/A thread_1 N/A N/A N/A feedback_models FeedbackThreadModel create exp_id thread_id_1 N/A N/A thread_1 exploration_id exp_id N/A N/A N/A thread_1 put N/A N/A N/A self _run_job_and_check_results exp_id N/A num_open_threads num_total_threads 1 1 N/A N/A N/A ModifiedFeedbackAnalyticsAggregator stop_computation user_id N/A N/A N/A self assertEqual N/A N/A self count_jobs_in_taskqueue 0 N/A thread N/A N/A N/A feedback_models FeedbackThreadModel get_by_exp_and_thread_id exp_id thread_id_1 N/A N/A thread status N/A feedback_models STATUS_CHOICES_FIXED N/A N/A N/A thread put N/A N/A N/A self _run_job_and_check_results exp_id N/A num_open_threads num_total_threads 0 1 N/A test_thread_closed_reopened_again N/A N/A self N/A N/A N/A N/A N/A self _get_swap_context N/A N/A user_id uid N/A exp_id eid N/A thread_id_1 tid1 N/A N/A N/A self save_new_valid_exploration exp_id owner N/A thread_1 N/A N/A N/A feedback_models FeedbackThreadModel create exp_id thread_id_1 N/A N/A thread_1 exploration_id exp_id N/A N/A N/A thread_1 put N/A N/A N/A self _run_job_and_check_results exp_id N/A num_open_threads num_total_threads 1 1 N/A N/A N/A ModifiedFeedbackAnalyticsAggregator stop_computation user_id N/A N/A N/A self assertEqual N/A N/A self count_jobs_in_taskqueue 0 N/A thread N/A N/A N/A feedback_models FeedbackThreadModel get_by_exp_and_thread_id exp_id thread_id_1 N/A N/A thread status N/A feedback_models STATUS_CHOICES_FIXED N/A N/A N/A thread put N/A N/A N/A self _run_job_and_check_results exp_id N/A num_open_threads num_total_threads 0 1 N/A N/A N/A ModifiedFeedbackAnalyticsAggregator stop_computation user_id N/A N/A N/A self assertEqual N/A N/A self count_jobs_in_taskqueue 0 N/A thread N/A N/A N/A feedback_models FeedbackThreadModel get_by_exp_and_thread_id exp_id thread_id_1 N/A N/A thread status N/A feedback_models STATUS_CHOICES_OPEN N/A N/A N/A thread put N/A N/A N/A self _run_job_and_check_results exp_id N/A num_open_threads num_total_threads 1 1 N/A test_thread_closed_status_changed N/A N/A self N/A N/A N/A N/A N/A self _get_swap_context N/A N/A user_id uid N/A exp_id eid N/A thread_id_1 tid1 N/A N/A N/A self save_new_valid_exploration exp_id owner N/A thread_1 N/A N/A N/A feedback_models FeedbackThreadModel create exp_id thread_id_1 N/A N/A thread_1 exploration_id exp_id N/A N/A N/A thread_1 put N/A N/A N/A self _run_job_and_check_results exp_id N/A num_open_threads num_total_threads 1 1 N/A N/A N/A ModifiedFeedbackAnalyticsAggregator stop_computation user_id N/A N/A N/A self assertEqual N/A N/A self count_jobs_in_taskqueue 0 N/A thread N/A N/A N/A feedback_models FeedbackThreadModel get_by_exp_and_thread_id exp_id thread_id_1 N/A N/A thread status N/A feedback_models STATUS_CHOICES_FIXED N/A N/A N/A thread put N/A N/A N/A self _run_job_and_check_results exp_id N/A num_open_threads num_total_threads 0 1 N/A N/A N/A ModifiedFeedbackAnalyticsAggregator stop_computation user_id N/A N/A N/A self assertEqual N/A N/A self count_jobs_in_taskqueue 0 N/A thread N/A N/A N/A feedback_models FeedbackThreadModel get_by_exp_and_thread_id exp_id thread_id_1 N/A N/A thread status N/A feedback_models STATUS_CHOICES_IGNORED N/A N/A N/A thread put N/A N/A N/A self _run_job_and_check_results exp_id N/A num_open_threads num_total_threads 0 1 N/A N/A RealtimeFeedbackAnalyticsUnitTests N/A N/A test_utils GenericTestBase N/A N/A Tests for realtime analytics of feedback models. N/A ALL_CC_MANAGERS_FOR_TESTS N/A ModifiedFeedbackAnalyticsAggregator _get_swap_context N/A N/A self N/A N/A N/A N/A N/A self swap jobs_registry ALL_CONTINUOUS_COMPUTATION_MANAGERS N/A self ALL_CC_MANAGERS_FOR_TESTS N/A _flush_tasks_and_check_analytics N/A N/A self exp_id expected_thread_analytics_dict N/A N/A N/A N/A N/A self process_and_flush_pending_tasks N/A N/A N/A self assertEqual N/A N/A N/A N/A ModifiedFeedbackAnalyticsAggregator get_thread_analytics exp_id to_dict expected_thread_analytics_dict N/A test_no_threads N/A N/A self N/A N/A N/A N/A N/A self _get_swap_context N/A N/A exp_id eid N/A N/A N/A self save_new_valid_exploration exp_id owner N/A N/A N/A self _flush_tasks_and_check_analytics exp_id N/A num_open_threads num_total_threads 0 0 N/A test_single_thread_single_exp N/A N/A self N/A N/A N/A N/A N/A self _get_swap_context N/A N/A exp_id eid N/A N/A N/A self save_new_valid_exploration exp_id owner N/A N/A N/A self process_and_flush_pending_tasks N/A N/A N/A feedback_services create_thread exp_id a_state_name None a subject some text N/A N/A N/A self _flush_tasks_and_check_analytics exp_id N/A num_open_threads num_total_threads 1 1 N/A test_multiple_threads_single_exp N/A N/A self N/A N/A N/A N/A N/A self _get_swap_context N/A N/A exp_id eid N/A N/A N/A self save_new_valid_exploration exp_id owner N/A N/A N/A self process_and_flush_pending_tasks N/A N/A N/A feedback_services create_thread exp_id a_state_name None a subject some text N/A N/A N/A feedback_services create_thread exp_id a_state_name None a subject some text N/A N/A N/A self _flush_tasks_and_check_analytics exp_id N/A num_open_threads num_total_threads 2 2 N/A test_multiple_threads_multiple_exp N/A N/A self N/A N/A N/A N/A N/A self _get_swap_context N/A N/A exp_id_1 eid1 N/A exp_id_2 eid2 N/A N/A N/A self save_new_valid_exploration exp_id_1 owner N/A N/A N/A self save_new_valid_exploration exp_id_2 owner N/A N/A N/A self process_and_flush_pending_tasks N/A N/A N/A feedback_services create_thread exp_id_1 a_state_name None a subject some text N/A N/A N/A feedback_services create_thread exp_id_1 a_state_name None a subject some text N/A N/A N/A feedback_services create_thread exp_id_2 a_state_name None a subject some text N/A N/A N/A feedback_services create_thread exp_id_2 a_state_name None a subject some text N/A N/A N/A self _flush_tasks_and_check_analytics exp_id_1 N/A num_open_threads num_total_threads 2 2 N/A N/A N/A self _flush_tasks_and_check_analytics exp_id_2 N/A num_open_threads num_total_threads 2 2 N/A test_thread_closed_job_running N/A N/A self N/A N/A N/A N/A N/A self _get_swap_context N/A N/A exp_id eid N/A N/A N/A self save_new_valid_exploration exp_id owner N/A N/A N/A self process_and_flush_pending_tasks N/A N/A N/A feedback_services create_thread exp_id a_state_name None a subject some text N/A N/A N/A self _flush_tasks_and_check_analytics exp_id N/A num_open_threads num_total_threads 1 1 N/A threadlist N/A N/A feedback_services get_all_threads exp_id False N/A thread_id N/A N/A N/A threadlist N/A 0 get_thread_id N/A N/A N/A feedback_services create_message exp_id thread_id author N/A feedback_models STATUS_CHOICES_FIXED None some text N/A N/A N/A self _flush_tasks_and_check_analytics exp_id N/A num_open_threads num_total_threads 0 1 N/A test_thread_closed_reopened_again N/A N/A self N/A N/A N/A N/A N/A self _get_swap_context N/A N/A exp_id eid N/A N/A N/A self save_new_valid_exploration exp_id owner N/A N/A N/A self process_and_flush_pending_tasks N/A N/A N/A feedback_services create_thread exp_id a_state_name None a subject some text N/A N/A N/A self _flush_tasks_and_check_analytics exp_id N/A num_open_threads num_total_threads 1 1 N/A threadlist N/A N/A feedback_services get_all_threads exp_id False N/A thread_id N/A N/A N/A threadlist N/A 0 get_thread_id N/A N/A N/A feedback_services create_message exp_id thread_id author N/A feedback_models STATUS_CHOICES_FIXED None some text N/A N/A N/A self _flush_tasks_and_check_analytics exp_id N/A num_open_threads num_total_threads 0 1 N/A threadlist N/A N/A feedback_services get_all_threads exp_id False N/A thread_id N/A N/A N/A threadlist N/A 0 get_thread_id N/A N/A N/A feedback_services create_message exp_id thread_id author N/A feedback_models STATUS_CHOICES_OPEN None some text N/A N/A N/A self _flush_tasks_and_check_analytics exp_id N/A num_open_threads num_total_threads 1 1 N/A test_thread_closed_status_changed N/A N/A self N/A N/A N/A N/A N/A self _get_swap_context N/A N/A exp_id eid N/A N/A N/A self save_new_valid_exploration exp_id owner N/A N/A N/A self process_and_flush_pending_tasks N/A N/A N/A feedback_services create_thread exp_id a_state_name None a subject some text N/A N/A N/A self _flush_tasks_and_check_analytics exp_id N/A num_open_threads num_total_threads 1 1 N/A threadlist N/A N/A feedback_services get_all_threads exp_id False N/A thread_id N/A N/A N/A threadlist N/A 0 get_thread_id N/A N/A N/A feedback_services create_message exp_id thread_id author N/A feedback_models STATUS_CHOICES_FIXED None some text N/A N/A N/A self _flush_tasks_and_check_analytics exp_id N/A num_open_threads num_total_threads 0 1 N/A threadlist N/A N/A feedback_services get_all_threads exp_id False N/A thread_id N/A N/A N/A threadlist N/A 0 get_thread_id N/A N/A N/A feedback_services create_message exp_id thread_id author N/A feedback_models STATUS_CHOICES_IGNORED None some text N/A N/A N/A self _flush_tasks_and_check_analytics exp_id N/A num_open_threads num_total_threads 0 1 N/A test_realtime_with_batch_computation N/A N/A self N/A N/A N/A N/A N/A self _get_swap_context N/A N/A user_id uid N/A exp_id eid N/A N/A N/A self save_new_valid_exploration exp_id owner N/A N/A N/A feedback_services create_thread exp_id a_state_name None a subject some text N/A N/A N/A self process_and_flush_pending_tasks N/A N/A N/A ModifiedFeedbackAnalyticsAggregator start_computation N/A N/A N/A self assertEqual N/A N/A self count_jobs_in_taskqueue 1 N/A N/A N/A self process_and_flush_pending_tasks N/A N/A N/A ModifiedFeedbackAnalyticsAggregator stop_computation user_id N/A N/A N/A self assertEqual N/A N/A self count_jobs_in_taskqueue 0 N/A N/A N/A self _flush_tasks_and_check_analytics exp_id N/A num_open_threads num_total_threads 1 1 N/A N/A N/A feedback_services create_thread exp_id a_state_name None a subject some text N/A N/A N/A self _flush_tasks_and_check_analytics exp_id N/A num_open_threads num_total_threads 2 2 N/A N/A