Access Rails model inside jets jobs using afterburner

question

#1

I have a scenario where I have a rails application with user model. I have followed the jets after burner document and added .jets/project directory inside my application.

Now I want to write a job which will fetch all the user and send email to them. I want to write this job inside jets under .jets/project/jobs/notification_job.rb. Here is my class

class NotificationJob < ApplicationJob
  rate "1 minute"
  def notify
    puts "User is"
    puts User.count
  end
end

The problem is that I can’t access the User model which I defined in the rails application here. Is there any way to do that ?


#2

Any help here please ?