You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TaskExecutor now has new options. The old type TaskExecutorOptions is incompatible and creating an instance using TaksExecutor.create now has new parameters.
New events approach. 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 the run() methods has now been renamed to ExeUnit and thus ctx has been renamed to exe
TaskExecutor.onActivityReady method has been moved to TaskExecutorOptions as setup 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 to TaskFunction and name of worker object has been renamed to taskFunction
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 of GolemNetwork and the use of manyOf to provide ResourceRenatlPool and prepare ExeUnit. 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