teraslice
teraslice copied to clipboard
Operation APIs are not available in the constructor of operations
Calling this.getAPI()
in the constructor of an operation in the pipeline will fail while calling it in the process function succeeds. The API is registered on the job so it seems like it should be available by the time the operations are instantiated.
After consulting with Peter, we are not sure that it is feasible/appropriate to have getApi
available during the constructor phase of an operation. Some of the setup of the api's may be async, which we cannot do properly in the constructor phase. We would not be able to guarantee that all necessary api's, especially any api's made by other processors/fetchers would work. In our other processors we usually do this kind of setup in the initialize
method of the operation.
Not a major concern.