@golem-sdk/task-executor
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -263,2 +263,4 @@ 'use strict'; | ||
async startTask(task) { | ||
const abortController = new AbortController(); | ||
const { signal, cleanup } = golemJs.anyAbortSignal(this.abortController.signal, abortController.signal); | ||
try { | ||
@@ -270,3 +272,2 @@ task.init(); | ||
} | ||
const abortController = new AbortController(); | ||
task.onStateChange((state) => { | ||
@@ -277,3 +278,2 @@ if (state === TaskState.Rejected || state === TaskState.Retry) { | ||
}); | ||
const signal = golemJs.anyAbortSignal(this.abortController.signal, abortController.signal); | ||
const rental = await this.resourceRentalPool.acquire(signal); | ||
@@ -298,2 +298,5 @@ if (task.isFailed()) { | ||
} | ||
finally { | ||
cleanup(); | ||
} | ||
} | ||
@@ -300,0 +303,0 @@ async retryTask(task) { |
{ | ||
"name": "@golem-sdk/task-executor", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "A golem-js based library allowing running computation tasks on Golem, designed for batch map-reduce like scenarios", | ||
@@ -66,3 +66,3 @@ "repository": "https://github.com/golemfactory/golem-sdk-task-executor", | ||
"dependencies": { | ||
"@golem-sdk/golem-js": "^3.2.0", | ||
"@golem-sdk/golem-js": "^3.3.0", | ||
"eventemitter3": "^5.0.1" | ||
@@ -69,0 +69,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1807044
4068
Updated@golem-sdk/golem-js@^3.3.0