Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jul 19, 2025. It is now read-only.

Commit 34d9cda

Browse files
Make it possible to actually set concurrency
We were reading it from the top-level of config.json, but it's being filtered out from the yaml and not being included, so we always have the default of 2. I'd like to try going to 1 to help investigate something else, and now it will be possible. Also, now that we're able to set this value, we need to make sure it's not a string.
1 parent 3d837bd commit 34d9cda

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

‎lib/cc/engine/analyzers/engine_config.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def languages
2222
end
2323

2424
def concurrency
25-
config.fetch("concurrency", 2)
25+
config.fetch("config",{}).fetch("concurrency", 2).to_i
2626
end
2727

2828
def mass_threshold_for(language)

‎spec/cc/engine/analyzers/engine_config_spec.rb‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,4 +158,16 @@
158158
expect(engine_config.include_paths).to eq(["/tmp"])
159159
end
160160
end
161+
162+
describe "concurrency" do
163+
it "coerces to a number" do
164+
engine_config = CC::Engine::Analyzers::EngineConfig.new({
165+
"config" => {
166+
"concurrency" => "45",
167+
},
168+
})
169+
170+
expect(engine_config.concurrency).to eq(45)
171+
end
172+
end
161173
end

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /