2
0
mirror of https://github.com/moebooru/moebooru synced 2025-08-22 01:47:48 +00:00
moebooru/app/controllers/job_task_controller.rb
petopeto 30ff4fccd3 --HG--
branch : moe
extra : convert_revision : svn%3A2d28d66d-8d94-df11-8c86-00306ef368cb/trunk/moe%405
2010-04-20 23:05:11 +00:00

25 lines
662 B
Ruby

class JobTaskController < ApplicationController
layout "default"
def index
@job_tasks = JobTask.paginate(:per_page => 25, :order => "id DESC", :page => params[:page])
end
def show
@job_task = JobTask.find(params[:id])
if @job_task.task_type == "upload_post" && @job_task.status == "finished"
redirect_to :controller => "post", :action => "show", :id => @job_task.status_message
end
end
def retry
@job_task = JobTask.find(params[:id])
if request.post?
@job_task.update_attributes(:status => "pending", :status_message => "")
redirect_to :action => "show", :id => @job_task.id
end
end
end