search for: performmethod

Displaying 1 result from an estimated 1 matches for "performmethod".

2011 Apr 18
2
Problem with resque; parent process doesn't die
.../foo_job.rb class FooJob @queue = :normal def self.perform Bar.add_jobs end end app/models/bar.rb class Bar def self.add_jobs students = find :all students.each { |student| student.enqueue(:asap) } end end Here FooJob(queue: normal) is executed using resque scheduler. The performmethod in FooJob calls method add_jobs from class Bar. In this method, results are found, and put one by one on queue asap. So FooJob becomes parent process, and execution of ''student'' becomes child process. So there should be 2 running processes in the system when this executes. Whe...