2012-08-17 75 views
5

代碼工作正常與延遲就業機會和delayed_jobs表及其製作隊列和工人正在處理他們,但我們仍然是在銷燬對象三角洲索引 - 延遲喬布斯不工作

及彼的例外是跟蹤

vendor/bundle/ruby/1.9.1/gems/riddle-1.5.1/lib/riddle/client.rb:639:in `recv' 
vendor/bundle/ruby/1.9.1/gems/riddle-1.5.1/lib/riddle/client.rb:639:in `block in request' 
vendor/bundle/ruby/1.9.1/gems/riddle-1.5.1/lib/riddle/client.rb:538:in `connect' 
vendor/bundle/ruby/1.9.1/gems/riddle-1.5.1/lib/riddle/client.rb:623:in `request' 
vendor/bundle/ruby/1.9.1/gems/riddle-1.5.1/lib/riddle/client.rb:226:in `run' 
vendor/bundle/ruby/1.9.1/gems/riddle-1.5.1/lib/riddle/client.rb:338:in `query' 
vendor/bundle/ruby/1.9.1/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx/search.rb:414:in `block (2 levels) in populate' 
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/notifications.rb:123:in `block in instrument' 
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument' 
vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.3/lib/active_support/notifications.rb:123:in `instrument' 
vendor/bundle/ruby/1.9.1/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx/search.rb:518:in `log' 
vendor/bundle/ruby/1.9.1/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx/search.rb:527:in `log' 
vendor/bundle/ruby/1.9.1/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx/search.rb:413:in `block in populate' 
vendor/bundle/ruby/1.9.1/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx/search.rb:568:in `call' 
vendor/bundle/ruby/1.9.1/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx/search.rb:568:in `retry_on_stale_index' 
vendor/bundle/ruby/1.9.1/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx/search.rb:411:in `populate' 
vendor/bundle/ruby/1.9.1/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx/search.rb:176:in `method_missing' 
vendor/bundle/ruby/1.9.1/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx/search_methods.rb:395:in `search_for_id' 
vendor/bundle/ruby/1.9.1/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx/active_record.rb:268:in `delete_in_index' 
vendor/bundle/ruby/1.9.1/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx/active_record.rb:348:in `block in toggle_deleted' 
vendor/bundle/ruby/1.9.1/gems/thinking-sphinx-2.0.10/lib/thinking_sphinx/active_record.rb:34 
. 
. 
. 
app/controllers/received_messages_controller.rb:142:in `destroy' 

延遲工作增量已被添加的問題,爲什麼它試圖直接思考獅身人面像?

這裏是界定指標集團

define_index do 
    if Rails.env.production? 
     set_property :delta => FlyingSphinx::DelayedDelta 
    else 
     set_property :delta => true 
    end 

    indexes message.subject 

    has user_id, read, created_at 

    where "users_user_messages.is_active = 'Y'" 

    end 

回答

2

這裏發生的事情就是思考獅身人面像檢查獅身人面像對象是否存在將其標記爲刪除之前 - 而做到這一點的唯一方法是進行搜索。雖然思維獅身人面像內置了一些錯誤處理,但它應該捕捉(並忽略)來自Sphinx的錯誤,所以我有點不確定你爲什麼會看到異常被提出。

你能分享出現在堆棧跟蹤之前的錯誤描述嗎?

此外,這與延遲作業無關。