Commit Graph

185 Commits

Author SHA1 Message Date
Jeremy Daer
a66780bfff Active Job: smaller footprint for the dev/test async adapter
Use one shared worker pool for all queues with 0-#CPU workers rather
than separate pools per queue with 2-10*#CPU workers each.
2016-02-29 15:58:26 -07:00
Rafael Mendonça França
116581be91 Do not define methods in the included block
Instance methods can be defined in the module itself
2016-02-24 13:37:32 -03:00
eileencodes
826420b5fc Prep release for Rails 5 beta3 2016-02-24 10:27:02 -05:00
Abhishek Jain
9a2ca9cf69 [ci skip] Fix enqueuing spelling to maintain consistency 2016-02-12 23:49:08 +05:30
yuuji.yaginuma
6809758bc6 fix typo in assert_enqueued_jobs example [ci skip] 2016-02-07 09:12:19 +09:00
David Heinemeier Hansson
439fadf758 Missed a few spots in inline -> async switch 2016-02-05 16:05:48 +01:00
David Heinemeier Hansson
625baa69d1 Change the default adapter from inline to async 2016-02-05 15:35:37 +01:00
Sean Griffin
49f6ce63f3 Preparing for Rails 5.0.0.beta2 2016-02-01 14:37:52 -07:00
Jon Moss
0db5882bb0 Update sucker_punch adapter's description
[ci skip]
2016-01-27 16:07:46 -05:00
Jon Moss
a9a64c490d Update ActiveJob adapter for sucker_punch 2.0
This PR includes two changes for 2.0.0:

- Breaking API change around `async.perform` --> `perform_async`
- New addition of `perform_in`, which now allows end users of the
  adapter to use the `enqueued_at` public API method.
2016-01-27 12:49:35 -05:00
Aaron Patterson
6dfab475ca Merge branch '5-0-beta-sec'
* 5-0-beta-sec:
  bumping version
  fix version update task to deal with .beta1.1
  Eliminate instance level writers for class accessors
  allow :file to be outside rails root, but anything else must be inside the rails view directory
  Don't short-circuit reject_if proc
  stop caching mime types globally
  use secure string comparisons for basic auth username / password
2016-01-25 11:25:11 -08:00
Aaron Patterson
908c011395 bumping version 2016-01-25 10:22:15 -08:00
Santiago Pastorino
4d98b0d837 Merge pull request #22487 from joshsoftware/issue_22413
Added support for bigdecimals in perform_later
2016-01-01 18:58:42 -03:00
eileencodes
7eae0bb88e Change alpha to beta1 to prep for release of Rails 5
🎉 🍻
2015-12-18 12:14:09 -05:00
Siva Gollapalli
135258af0b Added support for bigdecimals in perform later 2015-12-03 18:45:55 +05:30
Mike Boone
ece366be07 Fixed wording. 2015-11-08 20:38:13 -05:00
Jerry D'Antonio
23b6f65fd1 Require only necessary concurrent-ruby classes. 2015-11-04 21:12:28 -05:00
Yuki Nishijima
266455cf25 Deprecate exception#original_exception in favor of exception#cause 2015-11-03 06:54:34 -08:00
Matthew Draper
30bacc26f8 Merge pull request #21878 from Gaurav2728/require_monitor
monitor is require for SneakersAdapter
2015-10-10 02:42:11 +10:30
Wojciech Wnętrzak
c2854af747 Added missing specs for not modifying queues when using AJ test helpers 2015-10-07 20:02:15 +02:00
Gaurav Sharma
b0a3a68889 monitor is require for SneakersAdapter
we are using `@monitor = Monitor.new` that inherit from Monitor class, we leave behind this commit https://github.com/rails/rails/commit/cbfc8b36
2015-10-06 10:34:56 +05:30
Yves Senn
c468d7fedd Merge pull request #21854 from morgoth/fix-serializing-at-option-in-aj-matchers
Fixed serializing `:at` option for `assert_eqnueued_with` and `assert_performed_with`
2015-10-05 09:04:13 +02:00
Arthur Nogueira Neves
d2ef471b84 Merge pull request #20116 from cristianbica/activejob-enqueue-logging
ActiveJob - log enqueued message only after the job was successfully enqueued
2015-10-04 20:38:44 -04:00
Wojciech Wnętrzak
6e0254e8d3 Fixed serializing :at option for assert_enqueued_with and assert_performed_with 2015-10-03 15:23:05 +02:00
Wojciech Wnętrzak
8a67c56efb Support passing array to assert_enqueued_jobs in :only option 2015-10-03 13:25:16 +02:00
Wojciech Wnętrzak
3d63e1c155 Do not document private methods in AJ::TestHelper
[CI skip]
2015-10-02 18:19:00 +02:00
Rafael Mendonça França
0f89e15e80 Merge pull request #19425 from wvengen/feature/activejob-priority-master
Add job priorities to ActiveJob
2015-09-25 23:50:33 -03:00
Jerry D'Antonio
56ac6e4768 Replaced ThreadSafe::Map with successor Concurrent::Map.
The thread_safe gem is being deprecated and all its code has been merged
into the concurrent-ruby gem. The new class, Concurrent::Map, is exactly
the same as its predecessor except for fixes to two bugs discovered
during the merge.
2015-09-19 09:56:26 -04:00
wvengen
7059ab35f7 Add job priorities to ActiveJob 2015-09-17 22:17:39 +02:00
Marek Pieczyk
26f37f7c40 Properly log nested parameters to Active Job
Refactor arguments logging method for Active Job
2015-09-08 23:28:12 +02:00
Jerry D'Antonio
25a4155257 Initial implementation of ActiveJob AsyncAdapter. 2015-08-25 14:22:11 -04:00
Rafael Mendonça França
3f866cbdab Fix typo on method name
[Robin Dupret]
2015-08-16 19:28:32 -03:00
Yves Senn
68e3279163 implement provider_job_id for queue_classic.
The latest, currently unreleased, version of queue_classic is required
for this to work. See
https://github.com/QueueClassic/queue_classic/pull/262 for more details.
2015-08-13 10:00:19 +02:00
Jean Boussier
b6d3a478fa Make assert_enqueued_with and assert_performed_with returns the matched job 2015-08-10 20:14:42 -04:00
Yves Senn
6586fdaf28 Merge pull request #21145 from toydestroyer/master
[ci skip]

Documentation: update queue_classic info in Active Job adapters list
2015-08-06 14:31:21 +02:00
Sergey Toy
84eeec5ee6 Documentation: update queue_classic info in Active Job adapters list 2015-08-06 14:24:57 +03:00
Kasper Timm Hansen
7a3ca69959 Merge pull request #20800 from xijo/make_active_job_locale_aware
Make ActiveJob locale aware
2015-08-04 11:56:57 +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
Robin Dupret
a74fbb2972 Add :nodoc: for internal testing methods [ci skip] 2015-07-28 12:22:37 +02:00
Faraz Yashar
fd8122a878 Improve error message when serializing unsaved records for jobs 2015-06-28 14:58:01 -04:00
yui-knk
c7644e9eb0 [ci skip] Add . 2015-06-10 13:29:19 +09:00
Anton Davydov
455e44cd68 [skip ci] Add documentation for QueueAdapter::queue_adapter 2015-06-02 00:24:04 +03:00
Anton Davydov
528efcbbbe [skip ci] Update documentation for QueueAdapters::lookup 2015-06-01 14:21:28 +03:00
Gourav Tiwari
17c10038c5 doc changes for readability [ci skip] 2015-05-19 19:24:35 +00:00
Cristian Bica
30b640045f ActiveJob - log enqueued message only after the job was successfully enqueued 2015-05-11 21:19:46 +03:00
Rafael Mendonça França
fca8a7a7ba Merge pull request #20064 from kddeisz/qu_provider_job_id
Provide provider_job_id to qu adapter.
2015-05-08 15:13:05 -03:00
Mehmet Emin İNAÇ
e744cfee65 Refactor sidekiq adapter enqueue and enqueue_at methods 2015-05-08 16:45:04 +03:00
Kevin Deisz
221a411fd7 Provide provider_job_id to qu adapter.
Further work to provide provider_job_id for queue adapters.
2015-05-07 19:17:22 -04:00
Jeroen van Baarsen
29fcbc2ea0 Make que report back its job_id to provider_job_id
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-05-07 21:59:07 +02:00
Jeroen van Baarsen
52d131826e Let Sidekiq set provider_job_id
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>
2015-05-07 21:48:50 +02:00