diff options
author | David Heinemeier Hansson <david@basecamp.com> | 2014-08-17 16:44:30 -0700 |
---|---|---|
committer | David Heinemeier Hansson <david@basecamp.com> | 2014-08-17 16:44:30 -0700 |
commit | 49c9f850fa3e2484e3aaf20b2479f61b1cc9375e (patch) | |
tree | 2f2750a0801c0f2450f6908639973c38d9625963 /activejob/lib/active_job/identifier.rb | |
parent | b2708a635285f2b09040ee9070a8f5a09ab22282 (diff) | |
parent | 080296be61105f4f941441a506a6a9fe5c562772 (diff) | |
download | rails-49c9f850fa3e2484e3aaf20b2479f61b1cc9375e.tar.gz rails-49c9f850fa3e2484e3aaf20b2479f61b1cc9375e.tar.bz2 rails-49c9f850fa3e2484e3aaf20b2479f61b1cc9375e.zip |
Merge pull request #16485 from seuros/activejob
Integrate ActiveJob / DeliverLater / GlobalID with Rails
Diffstat (limited to 'activejob/lib/active_job/identifier.rb')
-rw-r--r-- | activejob/lib/active_job/identifier.rb | 15 |
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 |