aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/lib/active_job/identifier.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activejob/lib/active_job/identifier.rb')
-rw-r--r--activejob/lib/active_job/identifier.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/activejob/lib/active_job/identifier.rb b/activejob/lib/active_job/identifier.rb
new file mode 100644
index 0000000000..c7f522087d
--- /dev/null
+++ b/activejob/lib/active_job/identifier.rb
@@ -0,0 +1,15 @@
+require 'active_job/arguments'
+
+module ActiveJob
+ module Identifier
+ extend ActiveSupport::Concern
+
+ included do
+ attr_writer :job_id
+ end
+
+ def job_id
+ @job_id ||= SecureRandom.uuid
+ end
+ end
+end