为什么我在使用 resque-status 触发作业时堆栈级别太深?
以下是 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)
我还编写了一个非常简单的工作程序来丢弃我的任何编程错误,但也没有任何成功。测试工作代码是(尽管我尝试过使用 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 环境初始化中加载适当的初始化程序)。
Here is the stack trace which appears on resque-web interface: http://gist.github.com/396893
There you can check some gem versions that I was using.
Now I have made some upgrades trying to solve the problem, here are the current gem versions:
redis (2.0.3)
redis-namespace (0.5.0)
redisk (0.2.1)
resque (1.9.5)
resque-scheduler (1.9.2)
resque-status (0.1.4)
I have also wrote a very simple worker to discard any programming mistakes on my part, but also without any success. The test worker code is (though the bug occurs with any code using resque-status I have tried):
class SimpleStatusWorker < Resque::JobWithStatus
def perform
60.times do |i|
sleep 1
at(i,60,"At #{num} of #{total}")
end
end
end
(The appropriate initializer is being loaded in rails environment initialization).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不,这与 IIS 无关。这是关于弗拉德的。 Vlad 通过 eval 在 rake_remote_task.rb 上定义了一个“get”方法(第 12 行)。这在对象的上下文中创建了一个“get”方法。由于 Redis“get”方法未定义(由 method_missing 调用),因此它运行 Vlad 方法。看:
eval "def get\n put 'yo'\n end"
class Foo;结束
Foo.new.get
=>哟,
奇怪不是吗?
No, it's not about IIS. It's about Vlad. Vlad defines a method "get" by eval on rake_remote_task.rb (line ~12). This creates a "get" method in the context of Object. Since the Redis "get" method is not defined (it is called by method_missing) it runs Vlad method. Look:
eval "def get\n puts 'yo'\n end"
class Foo; end
Foo.new.get
=> yo
Weird ain't?
也许与 IIS 配置有关?
Maybe something with the IIS config?