Resque Worker: invalid operator: $oid

Viewed 1591

A worker that was working a few days ago has ceased to work for some reason.

The resque log reports an exception of Mongo::OperationFailure with the errorinvalid operator: $oid

class SimilarTargets
  @queue = :similar_queue

  def self.perform(target_id)
    source_target = Target.find(target_id)

    ....

  end
end

The worker is failing on Target.find(target_id), even when a straight string is passed in via the rails console.

Target.find(id) works fine in the console and elsewhere in the code and I can't figure out why this has failing even though the worker class has never changed in the last week.

2 Answers
Related