Jobs are queued on after a user is created like so in the model
user.rb
after_create_commit :profile_photo_jobdef profile_photo_job message = "Add a profile photo" ReminderJob.set(wait: 1800).perform_later(self.id.to_s, message)end
reminder_job.rb
class ReminderJob < ApplicationJob queue_as :default def perform(user_id, message) if user_id user = User.find(user_id) end ##sending message notification here endend
However, it often throws the following error inside my sidekiq console
ActiveRecord::RecordNotFound: Couldn't find User with 'id'=7749 Processor: User-MacBook-Pro.local:*****
This error happens in production.