We have a model who generate reports.
Each report can be very complicated and may take a long time to load. Therefore, we are using
ac = DelayedJobsController.new()
tmp_html = ac.render_to_string partial: self.partial_path, object: self
self.update_attributes(html: tmp_html, done: true)
After lots of work we found the problem.
When we did run
crontab -l and
ps aux we cud see that two instances of delayed_job was running. After we killed the oldest one of them all worked like it should.