Delayed_Job: accessing job metadata and/or avoiding duplicate jobs

Viewed 5050

i'm trying to get the run_at datetime in a custom job class. my code looks like this:

class MyCustomJob < Struct.new(:my_object)

  def perform
    if self.run_at == my_object.start_time
      # process the job
    end
  end

end

i also tried a Delayed::Job.find(self) but had no luck.

thanks in advance

2 Answers
Related