-
-
Notifications
You must be signed in to change notification settings - Fork 231
Open
Description
I've heard lots of chatter about the benefits of UUIDv7. If you want to try it for now, here's how to patch it in:
# config/initializers/good_job.rb
module ActiveJobUUIDv7
def initialize(*args)
super
@job_id = SecureRandom.uuid_v7
end
ruby2_keywords(:initialize)
end
ActiveSupport.on_load(:active_job) do
include ActiveJobUUIDv7
end
ActiveSupport.on_load(:good_job_execution) do
before_create { self.id ||= SecureRandom.uuid_v7 }
end
ActiveSupport.on_load(:good_job_process) do
before_create { self.id ||= SecureRandom.uuid_v7 }
end
ActiveSupport.on_load(:good_job_batch_record) do
before_create { self.id ||= SecureRandom.uuid_v7 }
end
ActiveSupport.on_load(:good_job_setting) do
before_create { self.id ||= SecureRandom.uuid_v7 }
endReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Projects
Status
Inbox