"固定"
问题已经消失了#39;当我重置我的服务器。似乎resque在服务器上存储信息,直到它可以将其放入redis。
原始问题:
我使用Redis的Resque和Ruby on Rails。
我的Redis有点生气。它创造了许多破碎的队列。
当我点击" Stats"我收到这个错误:
RuntimeError at /resque/stats/resque
can't add a new key into hash during iteration
我已经尝试redis.flushall
,但没效果。
以下是已损坏队列的完整列表:http://snag.gy/a3owG.jpg
Name Jobs
["[[:failed, []], []]", []] 0
["[[[:failed, []], []], []]", []] 0
["[[[[:failed, []], []], []], []]", []] 0
[:failed, []] 0
[["[[:failed, []], []]", []], []] 0
[["[[[:failed, []], []], []]", []], []] 0
[["[[[[:failed, []], []], []], []]", []], []] 0
[[:failed, []], []] 0
[[["[[:failed, []], []]", []], []], []] 0
[[["[[[:failed, []], []], []]", []], []], []] 0
[[["[[[[:failed, []], []], []], []]", []], []], []] 0
[[[:failed, []], []], []] 0
[[[["[[:failed, []], []]", []], []], []], []] 0
[[[["[[[:failed, []], []], []]", []], []], []], []] 0
[[[["[[[[:failed, []], []], []], []]", []], []], []], []] 0
[[[[:failed, []], []], []], []] 0
[[[[["[[:failed, []], []]", []], []], []], []], []] 0
[[[[["[[[:failed, []], []], []]", []], []], []], []], []] 0
[[[[["[[[[:failed, []], []], []], []]", []], []], []], []], []] 0
[[[[[:failed, []], []], []], []], []] 0
[[[[[["[[:failed, []], []]", []], []], []], []], []], []] 0
[[[[[["[[[:failed, []], []], []]", []], []], []], []], []], []] 0
[[[[[[:failed, []], []], []], []], []], []] 0
[[[[[[["[[:failed, []], []]", []], []], []], []], []], []], []] 0
[[[[[[[:failed, []], []], []], []], []], []], []] 0
[[[[[[[[:failed, []], []], []], []], []], []], []], []] 0
[[[[[[[[[:failed, []], []], []], []], []], []], []], []], []] 0
failed 0
这里是创建任务的代码 - 我相信这可以解释迭代。
class RegistrationEmails::LeadCreatedJob
@queue = :slow_emails
def self.perform(application_id)
# No check - send it when added
application = Application.find_by_id(application_id)
if application
# Send email
LeadMailer.lead_created(application_id).deliver_now
# Queue second part of campaign
Resque.enqueue_in(1.minute, RegistrationEmails::LeadCreatedFollowupJob, application_id)
end
end
end