aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/lib/active_job/identifier.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2014-08-17 16:54:26 -0700
committerDavid Heinemeier Hansson <david@loudthinking.com>2014-08-17 16:54:26 -0700
commit5d2de5c3b8d71ae7ffd1b4193edc1b169e00cd0e (patch)
tree959cf1f0132d89921fa1a276a2a8dc689e3c3aa0 /activejob/lib/active_job/identifier.rb
parentc20c86ee9e944e38ce0eb581e4af3ad4af839875 (diff)
parent49c9f850fa3e2484e3aaf20b2479f61b1cc9375e (diff)
downloadrails-5d2de5c3b8d71ae7ffd1b4193edc1b169e00cd0e.tar.gz
rails-5d2de5c3b8d71ae7ffd1b4193edc1b169e00cd0e.tar.bz2
rails-5d2de5c3b8d71ae7ffd1b4193edc1b169e00cd0e.zip
Merge branch 'master' of github.com:rails/rails
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