aboutsummaryrefslogtreecommitdiffstats
path: root/activejob/test/cases/job_serialization_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Make sure that when serialing an just deserialized job arguments are thereRafael Mendonça França2018-05-011-6/+6
| | | | | | | | | | | | | When a job was just deserialized `arguments` is `nil` and the serialized arguments are in the `@serialized_arguments` variable. If we try to serialize this job again the arguments are going to be `nil` instead of what was serialized. The test we had was not checking this case because it was deserializing the job in the same object that had the arguments. To fix this, when the `@serialized_arguments` are present we return it instead of the result of the `arguments` serialized.
* Add support for timezones to Active JobAndrew White2018-02-221-0/+7
| | | | | | Record what was the current timezone in effect when the job was enqueued and then restore when the job is executed in same way that the current locale is recorded and restored.
* [Active Job] `rubocop -a --only Layout/EmptyLineAfterMagicComment`Koichi ITO2017-07-111-0/+1
|
* Use frozen-string-literal in ActiveJobKir Shatrov2017-07-091-0/+1
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* ActiveJob::Core#serialize stores provider_job_id (fixes #26581).utilum2017-06-271-0/+8
|
* applies new string literal convention in activejob/testXavier Noria2016-08-061-14/+14
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Add JSON round trip verification testcaseMike Perham2016-03-091-1/+16
|
* Job payload should be symmetric across JSON dump/loadMike Perham2016-03-091-3/+3
| | | 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.
* Add missing HelloJob require.Kasper Timm Hansen2015-08-051-0/+1
| | | | This way JobSerializationTest runs in isolation without errors.
* Fixes #20799Johannes Opper2015-08-041-0/+16
| | | | | | | | | | | | | | | | | | | | | | 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.
* Active Job refactoringCristian Bica2014-09-031-1/+1
|
* [ActiveJob] Fix tests for sucker_punchAbdelkader Boudih2014-08-171-2/+2
|
* Moved AR testing from using global variable to thread variableCristian Bica2014-08-161-2/+2
|
* Add 'activejob/' from commit '14f74a8331f94150dfee653224de8fc837797709'Abdelkader Boudih2014-08-121-0/+15
git-subtree-dir: activejob git-subtree-mainline: b45b99894a60eda434abec94d133a1cfd8de2dda git-subtree-split: 14f74a8331f94150dfee653224de8fc837797709