【问题标题】:Why I'm getting stack level too deep while triggering a job using resque-status?为什么在使用 resque-status 触发作业时堆栈级别太深?
【发布时间】:2010-07-10 03:51:21
【问题描述】:

这是出现在 resque-web 界面上的堆栈跟踪:http://gist.github.com/396893
在那里你可以查看我使用的一些 gem 版本。
现在我进行了一些升级来解决这个问题,这里是当前的 gem 版本:

redis (2.0.3)
redis 命名空间 (0.5.0)
重盘 (0.2.1)
resque (1.9.5)
resque 调度程序 (1.9.2)
resque-status (0.1.4)

我还编写了一个非常简单的 worker 来丢弃我的任何编程错误,但也没有任何成功。测试工作者代码是(尽管我尝试过使用 resque-status 的任何代码都会出现该错误):

class SimpleStatusWorker < Resque::JobWithStatus
   def perform
     60.times do |i|
       sleep 1
       at(i,60,"At #{num} of #{total}")
     end
   end
 end

(在 rails 环境初始化中正在加载适当的初始化程序)。

【问题讨论】:

    标签: ruby-on-rails ruby-on-rails-plugins resque


    【解决方案1】:

    不,这与 IIS 无关。这是关于弗拉德的。 Vlad 在 rake_remote_task.rb (第 ~12 行)上通过 eval 定义了一个“get”方法。这会在 Object 的上下文中创建一个“get”方法。由于未定义 Redis“get”方法(由 method_missing 调用),它运行 Vlad 方法。看:

    eval "def get\n puts 'yo'\n end"

    类 Foo;结束

    Foo.new.get

    =>哟

    很奇怪吗?

    【讨论】:

    • 你是如何解决这个问题的?感谢您的回复!
    • 我没有。不要使用弗拉德。就这样。试试大力神。 github.com/diogob/hercules
    【解决方案2】:

    也许与 IIS 配置有关?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-03-04
      • 2013-10-05
      • 2011-11-17
      • 2012-07-24
      • 2016-08-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多