我正在尝试运行rake jobs:work
或从控制台Delayed::Worker.new.start
启动我的开发环境中的DelayedJob进程,我遇到了这个奇怪的错误:
Loading development environment (Rails 3.2.8)
1.9.3-head :001 > Delayed::Worker.new.start
Moped::Errors::OperationFailure: The operation: #<Moped::Protocol::Command
@length=410
@request_id=2
@response_to=0
@op_code=2004
@flags=[]
@full_collection_name="hapievents.$cmd"
@skip=0
@limit=-1
@selector={:findAndModify=>"delayed_backend_mongoid_jobs", :query=>{"run_at"=>{"$lte"=>2012-11-19 23:52:23 UTC}, "failed_at"=>nil, "$or"=>[{"locked_by"=>"host:Nunix-Netbook pid:11867"}, {"locked_at"=>nil}, {"locked_at"=>{"$lt"=>2012-11-19 19:52:23 UTC}}]}, :new=>true, :sort=>{"locked_by"=>-1, "priority"=>1, "run_at"=>1}, :update=>{"$set"=>{:locked_at=>2012-11-19 23:52:23 UTC, :locked_by=>"host:Nunix-Netbook pid:11867"}}}
@fields=nil>
failed with error "no such cmd"
我认为问题出在Mongo身上。我正在使用gem delayed_job_mongoid
。
起初我认为这是某项工作的问题,但现在我的工作清单是空的,我无法启动DelayedJob 服务器。