JS API Reference

Class: JobManager

experimental/job/job_manager.JobManager

This API is experimental and subject to change. Use at your own risk.

The Golem Network class provides a high-level API for running jobs on the Golem Network.

Table of contents

Constructors

Methods

Constructors

constructor

new JobManager(config?, logger?): JobManager

Parameters

NameTypeDescription
config?JobManagerConfigConfiguration options that will be passed to all jobs created by this instance.
loggerLogger

Returns

JobManager

Defined in

src/experimental/job/job_manager.ts:30

Methods

isInitialized

isInitialized(): boolean

Returns

boolean

Defined in

src/experimental/job/job_manager.ts:47


init

init(): Promise<void>

Returns

Promise<void>

Defined in

src/experimental/job/job_manager.ts:51


createJob

createJob<Output>(order): Job<Output>

Create a new job and add it to the list of jobs managed by this instance. This method does not start any work on the network, use experimental/job/job.Job.startWork for that.

Type parameters

NameType
Outputunknown

Parameters

NameType
orderMarketOrderSpec

Returns

Job<Output>

Defined in

src/experimental/job/job_manager.ts:61


getJobById

getJobById(id): undefined | Job<unknown>

Parameters

NameType
idstring

Returns

undefined | Job<unknown>

Defined in

src/experimental/job/job_manager.ts:71


close

close(): Promise<void>

Close the connection to the Yagna service and cancel all running jobs.

Returns

Promise<void>

Defined in

src/experimental/job/job_manager.ts:80