rails应用程序使用resque。我总是得到SystemExit错误退出错误作为在resque web界面中查看时的错误作业。如何解决?

时间:2013-05-28 00:55:56

标签: ruby-on-rails resque

我在/ lib中有类Compile,其方法我在app / workers

中的resque类中运行

resque类就是这个

         $:.unshift(Rails.root.join("lib"))
         require "Compile.rb"
         class CC
              @queue= :results_queue
              def self.perform(pid,x,fn,lang)
                      Dir.chdir(Rails.root.join("lib"));
                      tcid=fn[2..3];
                      fe=(Rails.root.join('sub',x)).to_s;
                      ipf=(Rails.root.join('io',pid,fn));
                      utf=(Rails.root.join('io',pid,"ans"+tcid.to_s));
                      ***res=Compile::Compile.runcode(fe.to_s,lang,1,ipf.to_s,utf.to_s);***
              end
   end

Compile.rb的类是这个

模块编译         class编译                 def self.runco​​de(file,lang,tl,inpf,outf) ........

我总是得到失败的工作异常SystemExit 错误退出 但当我删除上面 * 之间的res = ..行时,没有失败的作业。 任何人都可以帮帮我吗?

1 个答案:

答案 0 :(得分:0)

调试了它。理解了问题