I use the resque-history plugin to monitor completed tasks.
First, I include this line , requiring 'resque-history / server' in the routes file, and then I see a new history tab in the control panel.
This is the code in /app/jobs/welcome_email_job.rb
require 'resque-history'
class WelcomeEmailJob < ActiveJob::Base
extend Resque::Plugins::History
@max_history = 200
@queue = :email
def perform(user)
UserMailer.welcome_email(user).deliver_now
puts "I delivered mail to #{user.login} now, sincerly yours Resque <3"
end
end
When the work was done, I see in the statistics tab how many jobs were processed, but the history tab is empty, only the table. Can I solve this problem?
source
share