- GET
new_user_session_path
-> Sign In Page - POST
user_session_path
-> Sign In Action - DELETE
destroy_user_session_path
-> Sign Out Action - GET
edit_user_password_path
-> Update Password Page - PATCH
user_password_path
-> Update Password Action
-
Do not use delayed jobs if your system can have 100k+ jobs at a time in delayed jobs table. It'll cause the jobs to run very slow.
-
Check conditions before adding the jobs to queue, instead of checking inside the job. This'll prevent delayed jobs table from being over-populated.
# bad class Order < ApplicationRecord after_create :send_to_webhook
def send_to_webhook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GenericJob | |
include Sidekiq::Job | |
def perform(klass, id, undelayed_method, *args) | |
object = klass.constantize.find(id) | |
object.send(undelayed_method, *args) | |
end | |
end |