diff options
author | David Heinemeier Hansson <david@basecamp.com> | 2014-05-29 16:14:28 +0200 |
---|---|---|
committer | David Heinemeier Hansson <david@basecamp.com> | 2014-05-29 16:14:28 +0200 |
commit | 79d0adef3869c1c4d9c203a4ca9e96875295fdea (patch) | |
tree | 170a585c28b1da538aa4aabe893c0e84d9f92398 /lib/active_job/identifier.rb | |
parent | 895f06a2e16bb5da2d56f5bccc304d90c13836c4 (diff) | |
parent | 6eb163a706635c0ab5ede9056a0720f1a5f18f22 (diff) | |
download | rails-79d0adef3869c1c4d9c203a4ca9e96875295fdea.tar.gz rails-79d0adef3869c1c4d9c203a4ca9e96875295fdea.tar.bz2 rails-79d0adef3869c1c4d9c203a4ca9e96875295fdea.zip |
Merge pull request #61 from cristianbica/tagged-logging
Tagged logging
Diffstat (limited to 'lib/active_job/identifier.rb')
-rw-r--r-- | lib/active_job/identifier.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/active_job/identifier.rb b/lib/active_job/identifier.rb new file mode 100644 index 0000000000..af32b03404 --- /dev/null +++ b/lib/active_job/identifier.rb @@ -0,0 +1,16 @@ +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 |