v2.0.0-beta.1
Pre-release
Pre-release
github-actions
released this
18 Jul 09:10
·
24 commits
to beta
since this release
2.0.0-beta.1 (2024-07-18)
BREAKING CHANGES
- TaskExecutor now has new options. The old type
TaskExecutorOptions
is incompatible and creating an instance usingTaksExecutor.create
now has new parameters. - New events approach. EventTarget parameter has been removed. Now Task Executor-specific events are available in
TaskExecutor.events.on
, while events specific to GolemNetwork subdomains are available in eg.TaskExecutor.glm.market.events.on
- The
WorkContext
object available in the worker function in therun()
methods has now been renamed toExeUnit
and thusctx
has been renamed toexe
TaskExecutor.onActivityReady
method has been moved toTaskExecutorOptions
assetup
function- The current
WorkContext
(ctx)
object has a slightly different improved API according to the new spec in@golem-sdk/[email protected]
- The current
WorkerFunction
type has been renamed toTaskFunction
and name ofworker
object has been renamed totaskFunction
Features
- A completely new approach to ordering work using
TaskExecutor.create(options: TaskExecutorOptions)
and their individual components such as:order
,payment
,market
,demand
,task
etc. - Added setup and teardown functions as task options in ExecutorOptions
- New event dictionary and new approach to event handling
- Rewriting all examples for the new API
Code Refactoring
- The old API with
services
has been replaced by the use ofGolemNetwork
and the use ofmanyOf
to provideResourceRenatlPool
and prepareExeUnit
. The whole process of creating all golem entities has been encapsulated in the use of the new golem-js api
Tests
- All existing tests have been rewritten on the new API