Example #1
0
    def test_count_all_explorations(self):
        job_id = SampleMapReduceJobManager.create_new()
        SampleMapReduceJobManager.enqueue(
            job_id, taskqueue_services.QUEUE_NAME_DEFAULT)
        self.assertEqual(
            self.count_jobs_in_mapreduce_taskqueue(
                taskqueue_services.QUEUE_NAME_DEFAULT), 1)
        self.process_and_flush_pending_mapreduce_tasks()

        self.assertEqual(jobs.get_job_output(job_id), ['[u\'sum\', 1]'])
        self.assertEqual(SampleMapReduceJobManager.get_status_code(job_id),
                         jobs.STATUS_CODE_COMPLETED)
Example #2
0
 def get(self):
     """Handles GET requests."""
     job_id = self.request.get('job_id')
     self.render_json({'output': jobs.get_job_output(job_id)})
Example #3
0
 def get(self):
     """Handles GET requests."""
     job_id = self.request.get('job_id')
     self.render_json({
         'output': jobs.get_job_output(job_id)
     })