Created
January 18, 2011 04:28
-
-
Save dallarosa/783986 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#METHOD CALLING THE DELAYED_JOB | |
def start | |
@user = User.find(params[:user_id]) | |
@project = @user.projects.find(params[:project_id]) | |
Delayed::Job.enqueue(TextAnalysis.new(@project.tasks.find(22))) | |
flash[:notice] = "Processing" | |
redirect_to :action => "show" | |
#CLASS DEFINITION | |
class TextAnalysis < Struct.new(:task) | |
def perform | |
task.status = 1 | |
task.save | |
morph_analysis() # | |
. | |
. | |
. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment