aboutsummaryrefslogtreecommitdiffstats
path: root/activejob
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Merge pull request #20072 from vngrs/refactor_active_job_sidekiq_adapterYves Senn2015-05-081-6/+2
|\ \ \ | | | | | | | | Refactor sidekiq adapter enqueue and enqueue_at methods
| * | | Refactor sidekiq adapter enqueue and enqueue_at methodsMehmet Emin İNAÇ2015-05-081-6/+2
| |/ /
* / / Don't need to explicitly set test_order it's :random defaultMehmet Emin İNAÇ2015-05-081-2/+0
|/ /
* | Make que report back its job_id to provider_job_idJeroen van Baarsen2015-05-073-20/+13
| | | | | | | | Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
* | Let Sidekiq set provider_job_idJeroen van Baarsen2015-05-073-2/+21
| | | | | | | | | | | | | | | | | | | | When a job is added to Sidekiq by ActiveJob, make sure we still can get the original job_id provider by Sidekiq. We do this by adding the sidekiq jid to provider_job_id field on the job object. Partly fixes #18821 Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
* | Get provider_job_id from DelayedJobKevin Deisz2015-05-054-2/+22
| | | | | | | | | | When queueing with DelayedJob, get the id of the job instance and report it back to ActiveJob as provider_job_id.
* | Do not use named queues for que adapterRafael Mendonça França2015-05-032-2/+2
| | | | | | | | See #19498
* | Disable warnings on activejob testsRafael Mendonça França2015-05-031-2/+2
| | | | | | | | | | The implementations seems to not be interested to remove the warnings so enabling them we are just making harder to read the outputs
* | Merge pull request #19498 from chanks/activejob-que-remove-named-queuesRafael Mendonça França2015-05-032-3/+7
|\ \ | | | | | | ActiveJob: Stop using Que's named queues.
| * | Stop using Que's named queues in its ActiveJob adapter.Chris Hanks2015-03-242-3/+7
| | |
* | | Merge pull request #19969 from y-yagi/fix_job_helper_methodYves Senn2015-05-013-2/+30
|\ \ \ | | | | | | | | | | | | match a expected value with message of `assert_equal` in AJ helper methods
| * | | match a expected value with message of `assert_equal` in AJ helper methodsyuuji.yaginuma2015-05-011-2/+2
|/ / /
* | | Add doc for original_exception in ActiveJob::DeserializationError [ci skip]Zachary Scott2015-04-291-0/+2
| | |
* | | Add initial doc for Core in AJ [ci skip]Zachary Scott2015-04-291-0/+2
| | |
* | | Add initial doc for Enqueuing module [ci skip]Zachary Scott2015-04-291-0/+1
| | |
* | | Rails should be nodoc'd here [ci skip]Zachary Scott2015-04-291-1/+1
| | |
* | | Add missing error messages for sucker_punch, sneakers and qu activejob ↵Mehmet Emin İNAÇ2015-04-294-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adapters [ci skip] fix error message change raise to use rails conventions fix misspells
* | | nodoc private internal constants from ActiveJob::ArgumentsZachary Scott2015-04-261-0/+5
| | |
* | | Remove nonexistent adapterRafael Mendonça França2015-04-231-1/+0
| |/ |/| | | | | | | | | Closes #19866 [ci skip]
* | Queue Classic runs a second earlier than scheduledMatthew Draper2015-04-231-1/+1
| | | | | | | | | | | | | | That seems to be a bug, but as we don't actually care about the precision for our test, we'll just give it a bit longer. [Matthew Draper & Cristian Bica]
* | Only *configure* the queue in setup; DB creation must come laterMatthew Draper2015-04-202-21/+25
| | | | | | | | | | | | | | | | | | setup gets called from the initializer, so it happens more than once in a test run. Trying to drop the database again after the first process is connected is.. ineffective. And entirely pointless. Instead, defer creating the database to start_workers -- which only happens once, right before we start doing anything real.
* | Shuffle a few things in aid of easier debuggingMatthew Draper2015-04-201-20/+36
| | | | | | | | | | | | | | * Don't swallow output -- if there is any, it's probably useful * Wait for the process to finish * Use IPC instead of a sleep * No need for a pidfile
* | Fix sidekiq test order dependencyMatthew Draper2015-04-202-2/+3
| | | | | | | | | | | | | | | | Requiring sidekiq/testing changes stuff, so we need to counteract that after we do so. And given its potential to confuse things, let's do it up front, at a predictable point.
* | avoid double initialization error caused to sidekiqTakumi IINO2015-04-141-13/+34
| | | | | | | | | | | | Sidekiq::CLI#boot_system require "#{dummy_app_path}/config/environment.rb". But this file has already been required in'test/support/integration/helper.rb'. This patch will change to use Sidekiq::Launcher directly.
* | Merge pull request #19753 from jonatack/use-ruby-2-2-2Guillermo Iguaran2015-04-131-1/+1
|\ \ | | | | | | Upgrade to Ruby 2.2.2
| * | Upgrade to Ruby 2.2.2Jon Atack2015-04-141-1/+1
| | | | | | | | | | | | and fix the grammar in the ruby_version_check.rb user message.
* | | Fix a few typos and wrap some lines [ci skip]Robin Dupret2015-04-121-9/+17
| | |
* | | Copy edits for QueueAdapters docs to fix #17765 [ci skip]Zachary Scott2015-04-101-18/+18
| | |
* | | [ci skip] Adds documentation explaining table labels for Active Job ↵KingsleyKelly2015-04-091-7/+47
| | | | | | | | | | | | QueueAdapters table in docs.
* | | [ci skip] Adds rdoc for priority explaining what the labels in the table means.KingsleyKelly2015-04-061-0/+16
|/ /
* | Merge pull request #19034 from jvanbaarsen/explicit-job-base-classMatthew Draper2015-03-303-2/+5
|\ \ | | | | | | | | | Add explicit base class for ActiveJob jobs
| * | Add explicit base class for ActiveJob jobsJeroen van Baarsen2015-03-233-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | * Jobs generated now inherent from ApplicationJob * ApplicationJob inherents from ActiveJob::Base * Added entry to changelog Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
* | | Pass wrapped class name to Sidekiq for logging purposesMike Perham2015-03-232-7/+22
| |/ |/| | | | | | | | | | | 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
* | Closes rails/rails#18864: Renaming transactional fixtures to transactional testsBrandon Weiss2015-03-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I’m renaming all instances of `use_transcational_fixtures` to `use_transactional_tests` and “transactional fixtures” to “transactional tests”. I’m deprecating `use_transactional_fixtures=`. So anyone who is explicitly setting this will get a warning telling them to use `use_transactional_tests=` instead. I’m maintaining backwards compatibility—both forms will work. `use_transactional_tests` will check to see if `use_transactional_fixtures` is set and use that, otherwise it will use itself. But because `use_transactional_tests` is a class attribute (created with `class_attribute`) this requires a little bit of hoop jumping. The writer method that `class_attribute` generates defines a new reader method that return the value being set. Which means we can’t set the default of `true` using `use_transactional_tests=` as was done previously because that won’t take into account anyone using `use_transactional_fixtures`. Instead I defined the reader method manually and it checks `use_transactional_fixtures`. If it was set then it should be used, otherwise it should return the default, which is `true`. If someone uses `use_transactional_tests=` then it will overwrite the backwards-compatible method with whatever they set.
* | Move Adapter to private constantSemyon Pupkov2015-03-161-0/+1
|/
* `QueueAdapters` does the lookupTamir Duberstein2015-03-122-5/+9
|
* Use a more conservative `const_get` over `constantize`Tamir Duberstein2015-03-121-1/+1
|
* `ActiveJob::Base#queue_adapter` is now a `class_attribute`Tamir Duberstein2015-03-114-17/+82
| | | | | | This allows different `queue_adapters` to be used in each `ActiveJob` class heirarchy. Previously, all subclasses used a single global queue adapter.
* `ActiveJob::QueueAdapters::*` are no longer singletonsTamir Duberstein2015-03-1118-152/+173
|
* Fix naming collisionTamir Duberstein2015-03-111-1/+1
|
* Target Ruby 2.2.1 in gemspecsPeter Suschlik2015-03-091-1/+1
| | | | This is a follow-up to #19257
* Fix leaky `only: …` option for Active Job assertionsJeremy Kemper2015-03-062-9/+23
| | | | | | | The filter was set on the pseudo-global TestAdapter but not restored to its original value. See e818f65770fe115ab1cc7fbacc0e7e94d92af6a4
* Fixed ActiveJob integration testsCristian Bica2015-03-052-2/+4
|
* Minor fixes (proposal)Darío Hereñú2015-02-281-2/+2
|
* Avoid creating an extra hash on the job test adapterCarlos Antonio da Silva2015-02-241-1/+1
|
* `ActiveJob::QueueAdapters::TestAdapter` is now a singletonTamir Duberstein2015-02-234-31/+31
| | | | | | | | | 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.
* Changed the AJADAPTER to AJ_ADAPTERJeroen van Baarsen2015-02-226-7/+7
| | | | | | | * This allows for easier reading, since those are two words, so they should be split by _ Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
* Move #18833 changelog to the top [ci skip]Carlos Antonio da Silva2015-02-081-35/+33
|
* Add an `:only` option to `perform_enqueued_jobs` to filter jobs based onMichael Ryan2015-02-064-18/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Use public Module#include, in favor of https://bugs.ruby-lang.org/issues/8846robertomiranda2015-01-311-1/+1
| | | | ref: https://github.com/rails/rails/pull/18763#issuecomment-72349769