| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
QueueAdapters table in docs.
|
| |
|
|\
| |
| |
| | |
Add explicit base class for ActiveJob jobs
|
| |
| |
| |
| |
| |
| |
| |
| | |
* Jobs generated now inherent from ApplicationJob
* ApplicationJob inherents from ActiveJob::Base
* Added entry to changelog
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
|
| |
| |
| |
| |
| |
| |
| | |
Sidekiq logs the name of the job class being performed. Because
ActiveJob wraps the class, this means every job logs as an AJ::JobWrapper
instead of the actual class name.
Will help fix mperham/sidekiq#2248
|
|/ |
|
| |
|
| |
|
|
|
|
|
|
| |
This allows different `queue_adapters` to be used in each `ActiveJob`
class heirarchy. Previously, all subclasses used a single global queue
adapter.
|
| |
|
|
|
|
|
|
|
| |
The filter was set on the pseudo-global TestAdapter but not restored to
its original value.
See e818f65770fe115ab1cc7fbacc0e7e94d92af6a4
|
| |
|
|
|
|
|
|
|
|
|
| |
Since `ActiveJob::TestHelper` globally sets
`ActiveJob::Base.queue_adapter` on setup, there is no benefit in
instantiating a new `TestAdapter` per tests. The original rationale was
to allow parallel tests to run without interference, but since they'd
all mutate the global `ActiveJob::Base.queue_adapter`, that was never
realized.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
type.
This allows specific jobs to be tested, while preventing others from
being performed unnecessarily.
Example:
def test_hello_job
assert_performed_jobs 1, only: HelloJob do
HelloJob.perform_later('jeremy')
LoggingJob.perform_later
end
end
An array may also be specified, to support testing multiple jobs.
Example:
def test_hello_and_logging_jobs
assert_nothing_raised do
assert_performed_jobs 2, only: [HelloJob, LoggingJob] do
HelloJob.perform_later('jeremy')
LoggingJob.perform_later('stewie')
RescueJob.perform_later('david')
end
end
end
Fixes #18802.
Trim space and document :only option.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unfortunately, the HashWithIndifferent access approach is insufficient
for our needs. It's perfectly reasonable to want to use keyword
arguments with Active Job, which we will see as a symbol keyed hash. For
Ruby to convert this back to keyword arguments, it must deserialize to a
symbol keyed hash.
There are two primary changes to the serialization behavior. We first
treat a HWIA separately, and mark it as such so we can convert it back
into a HWIA during deserialization.
For normal hashes, we keep a list of all symbol keys, and convert them
back to symbol keys after deserialization.
Fixes #18741.
|
| |
|
| |
|
|
|
|
| |
With the option, assert_enqueued_jobs will check the number of times a specific kind of job is enqueued.
|
|\
| |
| | |
Update copyright notices to 2015 [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.
|
|\ \
| |/
|/| |
Fix spell life cycle on activejob docs [ci skip]
|
| | |
|
| | |
|
|\ \
| | |
| | | |
ActiveJob testing improvements
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
1. The :test adapter wasn't going through a full cycle of
serialize/deserialize when performing jobs. Now it does
2. Regular AJ tests were not run for the :test adapter. Now they are
3. ActiveJob::TestHelper uses assert_valid_keys but doesn’t requires
the file that implements that method. Now it does
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ActiveJob::Arguments uses Hash#with_indifferent_access.
But, activejob gem does not require Hash extension library.
When we use activejob as standalone,
we need extra require statement. This is unhandy.
This commit fixes it.
|
| |
| |
| |
| |
| | |
No need to point links to http://guides.rubyonrails.org/v4.2.0/... now
that the Ruby on Rails guides point to 4.2.0.
|
|\ \
| | |
| | | |
GlobalID objects are logged by their URI, not #inspect on the object, to prevent logging private data
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
* Show GlobalID instead of full object .inspect output
|
|/ /
| |
| |
| |
| |
| |
| | |
We will support only Ruby >= 2.1.
But right now we don't accept pull requests with syntax changes to drop
support to Ruby 1.9.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It will set proper queue_adapter state required by assert_performed_jobs assertions.
Also the block version of assert_performed_jobs will make sure this
state is respected.
Fixes #17684
|
| | |
|
| | |
|
| |
| |
| |
| | |
From dc5854f and c07c0b2 [ci skip]
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
for serialization and deserialization of jobs. [ci skip]
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
added punctuations, and role of queue_adapter module [ci skip]
|
| | | |
|
| | | |
|