Beispiel #1
0
    def get(self, request):

        pending_job_list = None
        dispatch_status1 = self.get_job_object(pk=1)
        if dispatch_status1.status == 'Stopped':
            pending_job_list = self.get_anal_object(status='pending')
        elif dispatch_status1.status == 'Finished':
            dispatch_status1.status = 'Stopped'
            dispatch_status1.save()
            pending_job_list = self.get_anal_object(status='pending')

        analyze_status1 = self.get_analyze_job_status_objects()
        analyze_status1.delete()

        form = dispatcher_status2_form()
        context = {'pending_job_list': pending_job_list, 'form': form}
        return render(request, 'gamesim/analyze_queue.html', context)
Beispiel #2
0
 def get(self, request):
     
     pending_job_list = None
     dispatch_status1 = self.get_job_object(pk=1)
     if dispatch_status1.status == 'Stopped':
         pending_job_list = self.get_anal_object(status = 'pending')
     elif dispatch_status1.status == 'Finished':
         dispatch_status1.status = 'Stopped'
         dispatch_status1.save()
         pending_job_list = self.get_anal_object(status = 'pending')            
           
     analyze_status1 = self.get_analyze_job_status_objects()
     analyze_status1.delete()        
      
     form = dispatcher_status2_form()
     context = {'pending_job_list':pending_job_list, 'form':form}
     return render(request, 'gamesim/analyze_queue.html', context)
Beispiel #3
0
    def post(self, request):

        pending_job_list = None
        dispatch_status1 = self.get_job_object(pk=1)
        if dispatch_status1.status == 'Stopped':
            pending_job_list = self.get_anal_object(status='pending')
        elif dispatch_status1.status == 'Finished':
            dispatch_status1.status = 'Stopped'
            dispatch_status1.save()
            pending_job_list = self.get_anal_object(status='pending')

        self.put_analyze_job_status_objects(pending_job_list[0].job_name)
        form = dispatcher_status2_form()
        context = {'pending_job_list': pending_job_list, 'form': form}

        if form.is_valid():
            return HttpResponseRedirect(reverse('gamesim:analyzer_dispatcher'))
        return render(request, 'gamesim/analyze_queue.html', context)
Beispiel #4
0
    def post(self, request):

        pending_job_list = None
        dispatch_status1 = self.get_job_object(pk=1)
        if dispatch_status1.status == 'Stopped':
            pending_job_list = self.get_anal_object(status = 'pending')
        elif dispatch_status1.status == 'Finished':
            dispatch_status1.status = 'Stopped'
            dispatch_status1.save()
            pending_job_list = self.get_anal_object(status = 'pending')            
        
        self.put_analyze_job_status_objects( pending_job_list[0].job_name)          
        form = dispatcher_status2_form() 
        context = {'pending_job_list':pending_job_list, 'form':form}
        
        if form.is_valid():
           return HttpResponseRedirect(reverse('gamesim:analyzer_dispatcher'))
        return render(request, 'gamesim/analyze_queue.html', context)