| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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]
|
| | | |
|
| | | |
|
|/ /
| |
| |
| | |
[ci skip]
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
- Added ActiveJob::Base#queue_name_delimiter to allow for
developers using ActiveJob to change the delimiter from the default
('_') to whatever else they may be using (e.g., '.', '-', ...).
- Updated source guide to include a blurb about the delimiter.
|
| | |
|
| |
| |
| |
| | |
[ci skip]
|
| |
| |
| |
| |
| |
| |
| |
| | |
accepts blocks for `assert_no_enqueued_jobs` and `assert_no_performed_jobs` test helpers.
- args => arguments when used in actual docs.
[ci skip]
|
|\ \
| | |
| | | |
Mention `perform_now` in AJ base docs to specify how to immediately invoke a job [ci skip]
|
| | |
| | |
| | |
| | | |
job. [ci skip]
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| | |
As discussed in #17195, Que uses blank queue names by default for
performance reasons. At the very least, ActiveJob should allow users to
choose "" as their queue name. This commit allows blank queue names, as
well as tests to make sure that nil queue names still use the default.
|
| |
| |
| |
| |
| | |
* This would override whatever default is configured in Sidekiq
system-wide, and retry is true by default anyway.
|
| | |
|