Closed veckatimest closed 2 years ago
There is a createWorker method of zbClient. It uses this configuration:
export interface ZBWorkerOptions<InputVars = IInputVariables> { maxJobsToActivate?: number // ... other fields fetchVariable?: (keyof InputVars)[] }
When I use fetchVariable option, I only receive specified variables in my job executor.
I receive all variables
Feels like library uses ActivateJobRequest from src/lib/interfaces-grpc-1.0.ts to fetch jobs.
ActivateJobRequest
And there is activateJobs method in the ZBWorkerBase.ts, that fetches jobs.
activateJobs
// some code const activateJobsRequest: ActivateJobsRequest = { maxJobsToActivate: amount, requestTimeout, timeout: this.timeout, type: this.taskType, worker: this.id, }
This request does not have fetchVariable in it, so I guess this is the problem (but the type does)
This is fixed in 8.0.3 of the client library.
There is a createWorker method of zbClient. It uses this configuration:
Expected Behavior
When I use fetchVariable option, I only receive specified variables in my job executor.
Current Behavior
I receive all variables
Possible Solution
Feels like library uses
ActivateJobRequest
from src/lib/interfaces-grpc-1.0.ts to fetch jobs.And there is
activateJobs
method in the ZBWorkerBase.ts, that fetches jobs.This request does not have fetchVariable in it, so I guess this is the problem (but the type does)
Steps to Reproduce