We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5e777d2 + 119411a commit a0a894cCopy full SHA for a0a894c
activejob/CHANGELOG.md
@@ -1,2 +1,5 @@
1
+* Use `RAILS_MAX_THREADS` in `ActiveJob::AsyncAdapter`. If it is not set, use 5 as default.
2
+
3
+ *heka1024*
4
5
Please check [7-2-stable](https://github.com/rails/rails/blob/7-2-stable/activejob/CHANGELOG.md) for previous changes.
activejob/lib/active_job/queue_adapters/async_adapter.rb
@@ -74,7 +74,7 @@ def perform
74
class Scheduler # :nodoc:
75
DEFAULT_EXECUTOR_OPTIONS = {
76
min_threads: 0,
77
- max_threads: Concurrent.processor_count,
+ max_threads: ENV.fetch("RAILS_MAX_THREADS", 5).to_i,
78
auto_terminate: true,
79
idletime: 60, # 1 minute
80
max_queue: 0, # unlimited
0 commit comments