Skip to content

Enable the Processor to delete resources created when a job DELETE is submitted #2382

Description

@francescoingv

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions