Skip to content

Commit

Permalink
Merge pull request #449 from sunny4381/fix-job-service-issue
Browse files Browse the repository at this point in the history
remove "e.kind_of?(fatal)" from Job::Service#system_error? because the NameError occurs
  • Loading branch information
sunny4381 committed May 22, 2015
2 parents 0487d30 + 2a14a23 commit 05be312
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion app/models/job/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ def execute_loop
end

def system_error?(e)
e.kind_of?(NoMemoryError) || e.kind_of?(SignalException) || e.kind_of?(SystemExit) || e.kind_of?(fatal)
# e.kind_of?(NoMemoryError) || e.kind_of?(SignalException) || e.kind_of?(SystemExit) || e.kind_of?(fatal)
e.kind_of?(NoMemoryError) || e.kind_of?(SignalException) || e.kind_of?(SystemExit)
end

def create_job(task)
Expand Down
8 changes: 4 additions & 4 deletions spec/models/voice/synthesis_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
end

it { expect(@job).not_to be_nil }
it { expect(system(@cmd)).to be false }
it { expect(system(@cmd)).to be_truthy }

describe "job" do
subject { Job::Task.find_by(name: 'job:voice_synthesis') rescue nil }
Expand Down Expand Up @@ -119,7 +119,7 @@
end

it { expect(@job).not_to be_nil }
it { expect(system(@cmd)).to be_falsey }
it { expect(system(@cmd)).to be_truthy }

describe "job" do
subject { Job::Task.find_by(name: 'job:voice_synthesis') rescue nil }
Expand Down Expand Up @@ -149,7 +149,7 @@
end

it { expect(@job).not_to be_nil }
it { expect(system(@cmd)).to be_falsey }
it { expect(system(@cmd)).to be_truthy }

describe "job" do
subject { Job::Task.find_by(name: 'job:voice_synthesis') rescue nil }
Expand Down Expand Up @@ -181,7 +181,7 @@
end

it { expect(@job).not_to be_nil }
it { expect(system(@cmd)).to be_falsey }
it { expect(system(@cmd)).to be_truthy }

describe "job" do
subject { Job::Task.find_by(name: 'job:voice_synthesis') rescue nil }
Expand Down

0 comments on commit 05be312

Please sign in to comment.