1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

18 commits

Author SHA1 Message Date
Rafael Mendonça França
fe1f4b2ad5
Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
Xavier Noria
93c9534c98 applies new string literal convention in activejob/lib
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 18:40:07 +02:00
David Heinemeier Hansson
a4fc7dc957 Executions counting is not a serialization concern
Let’s do it when we actually execute instead. Then the tests dealing
with comparable serializations won’t fail either!
2016-08-01 16:02:50 -07:00
David Heinemeier Hansson
8b5c04e423 Add retry_on/discard_on for better exception handling 2016-07-29 13:54:55 -07:00
Azzurrio
80e825915c Fix accessing provider_job_id inside active jobs for sidekiq adapter 2016-07-28 04:12:15 +02:00
Mike Perham
8c98186742 Add JSON round trip verification testcase 2016-03-09 09:28:16 -08:00
Mike Perham
702ef37767 Job payload should be symmetric across JSON dump/load
Placing non-native JSON data types, like symbols, in the hash to serialize means that the deserialize method will return something different from what was serialized, a common bug and source of frustration for devs.
2016-03-09 08:56:21 -08:00
wvengen
7059ab35f7 Add job priorities to ActiveJob 2015-09-17 22:17:39 +02:00
Johannes Opper
3860e6b2bf Fixes #20799
When `#perform_later` is called the locale isn't stored on the
queue, which results in a locale reset when the job is performed.

An example of the problem:

    I18n.locale = 'de'
    HelloJob.perform_now # german message, correct

but

    I18n.locale = 'de'
    HelloJob.perform_later # english message, incorrect

This PR attaches the current I18n.locale to every job during the
serialization process. It is then restored during deserialization
and used to perform the job with the correct locale.

It falls back to the default locale if no serialized locale is
found in order to provide backward compatibility with previously
stored jobs. It is not necessary to clear the queue for the update.
2015-08-04 00:38:18 +02:00
Kevin Deisz
dd8e859829 Get provider_job_id from DelayedJob
When queueing with DelayedJob, get the id of the job instance and report
it back to ActiveJob as provider_job_id.
2015-05-05 10:30:16 -04:00
Zachary Scott
785cb9fe75 Add initial doc for Core in AJ [ci skip] 2015-04-29 18:46:12 -07:00
Robin Dupret
f2b31cd6d1 Tiny follow-up to #18260 [ci skip]
Indent the list content by 4 spaces instead of 2 to match the other
changelog files. Also wrap the lines around 80 chars.

Finally update the documentation example with nit-picky things.
2014-12-31 17:35:41 +01:00
Isaac Seymour
65542e2797 ActiveJob: delegate full deserialization to class 2014-12-30 23:33:09 +00:00
Zachary Scott
73161c5744 Add documentation for class methods module included for AJ::Core used
for serialization and deserialization of jobs. [ci skip]
2014-11-03 19:22:11 -08:00
Robin Dupret
aeb431a6ca Tiny documentation improvements [ci skip] 2014-10-31 19:48:42 +01:00
yuuji.yaginuma
ab22946e51 [ci skip] fix typo in set examples 2014-09-27 15:07:24 +09:00
Akshay Vishnoi
9fddcdd99e [ci skip] AJ docs fixes
1. Indentation
2. Spaces issues
3. Spelling correction
4. Grammar correction
5. Add #:nodoc: to all internal classes
2014-09-18 01:16:53 +05:30
Cristian Bica
1e237b4e44 Active Job refactoring 2014-09-03 23:01:46 +03:00