Skip to content

Commit

Permalink
fix: updated golem-js to 3.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
grisha87 committed Oct 17, 2024
1 parent d1e1c0c commit 1655ce0
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 52 deletions.
72 changes: 36 additions & 36 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@
},
"homepage": "https://github.com/golemfactory/tesseract-ocr-golem#readme",
"dependencies": {
"@golem-sdk/golem-js": "^3.4.1",
"@golem-sdk/golem-js": "^3.4.2",
"debug": "^4.3.7",
"generic-pool": "^3.9.0"
},
"devDependencies": {
"@commitlint/cli": "^19.5.0",
"@commitlint/config-conventional": "^19.5.0",
"@types/debug": "^4.1.12",
"@types/node": "^20.16.11",
"@types/node": "^20.16.12",
"@types/wtfnode": "^0.7.3",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
Expand Down
25 changes: 11 additions & 14 deletions src/golem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,22 +315,19 @@ export class Golem {
dto: ProposalDTO,
resources: ServiceDeploymentConfig["resources"],
) {
// FIXME: Remove after https://github.com/golemfactory/golem-js/pull/1111 is released
if (dto.cpuThreads) {
if (resources.minCpuThreads && resources.maxCpuThreads) {
return (
dto.cpuThreads >= resources.minCpuThreads &&
dto.cpuThreads <= resources.maxCpuThreads
);
}
if (resources.minCpuThreads && resources.maxCpuThreads) {
return (
dto.cpuThreads >= resources.minCpuThreads &&
dto.cpuThreads <= resources.maxCpuThreads
);
}

if (resources.maxCpuThreads) {
return dto.cpuThreads <= resources.maxCpuThreads;
}
if (resources.maxCpuThreads) {
return dto.cpuThreads <= resources.maxCpuThreads;
}

if (resources.minCpuThreads) {
return dto.cpuThreads >= resources.minCpuThreads;
}
if (resources.minCpuThreads) {
return dto.cpuThreads >= resources.minCpuThreads;
}
}

Expand Down

0 comments on commit 1655ce0

Please sign in to comment.