If a Processor creates resources as an execution request, i.e. generating files (for the created job) to be returned by reference,
these resources are not visible to the Manager: possibly the Manager may know the reference (URL), but not the resource (full filename on filesystem).
When the API receive a DELETE for the job, then the resources (i.e. the above files) should be removed/deleted.
The only "entity" aware of the location of these resources is the Processor,
therefore the Processor should be able to receive a request to DELETE the generated resources.
The Manager should call a new method exposed by Processor while the Manager is processing a delete_job() request.
Describe the solution you'd like
Have a new, void method (hook) on BaseProcessor: say new_method(self, job_id: str)
This will cause no impact to current implementations not using this feature.
Have the BaseManager a new method to identify the Processor from the job_id, and call Processor.delete_job(): say new_method(self, job_id: str)
Modify the implemented Managers to invoke super.new_method(job_id) from within delete_job()
I would like to make it if approved.
If a
Processorcreatesresourcesas an execution request, i.e. generating files (for the createdjob) to be returned by reference,these
resourcesare not visible to theManager: possibly theManagermay know the reference (URL), but not the resource (full filename on filesystem).When the API receive a
DELETEfor thejob, then theresources(i.e. the above files) should be removed/deleted.The only "
entity" aware of the location of these resources is theProcessor,therefore the
Processorshould be able to receive a request toDELETEthe generatedresources.The
Managershould call a new method exposed byProcessorwhile theManageris processing adelete_job()request.Describe the solution you'd like
Have a new, void method (hook) on
BaseProcessor: saynew_method(self, job_id: str)This will cause no impact to current implementations not using this feature.
Have the
BaseManagera new method to identify theProcessorfrom thejob_id, and callProcessor.delete_job(): saynew_method(self, job_id: str)Modify the implemented
Managersto invokesuper.new_method(job_id)from withindelete_job()I would like to make it if approved.