Skip to content

Commit

Permalink
fix(amazonq): set Q_WORKER_THREADS only when setting is >0
Browse files Browse the repository at this point in the history
  • Loading branch information
grant0417 committed Aug 5, 2024
1 parent b7e3d29 commit 8654669
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type" : "bugfix",
"description" : "fix(amazonq): set Q_WORKER_THREADS only when setting is >0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,12 @@ class EncoderServer(val project: Project) : Disposable {
val map = mutableMapOf<String, String>(
"PORT" to port.toString(),
"START_AMAZONQ_LSP" to "true",
"Q_WORKER_THREADS" to threadCount.toString(),
"CACHE_DIR" to cachePath.toString(),
"MODEL_DIR" to cachePath.resolve("qserver").toString()
)
if (threadCount > 0 && threadCount < 100) {

Check notice on line 124 in plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/cwc/editor/context/project/EncoderServer.kt

View workflow job for this annotation

GitHub Actions / qodana

Two comparisons should be converted to a range check

Two comparisons should be converted to a range check
map["Q_WORKER_THREADS"] = threadCount.toString()
}
if (isGpuEnabled) {
map["Q_ENABLE_GPU"] = "true"
}
Expand Down

0 comments on commit 8654669

Please sign in to comment.