Background: After implementation of
MODOAIPMH-202, there is a table in which all ids which fits request params are inserted on first request to oai-pmh. In the second and all consequent requests are executed, this ids are processed and removed by batches for every request. But if there is no consequent requests with resumption token, these ids are retained in the table.
In scope of this story is to provide an endpoint that will allow to run the cleanup manually. In later development this endpoint will be used by a periodic job.
In order to determine which records can be considered as stale, the endpoint will take date and time stand parameter in the format: YYYY-MM-DDThh:mm:ss following requirements of ISO8601 standard and expressed in UTC timezone.
- Stale records are deleted
- Provide the endpoint to allow to run the cleanup. Later this endpoint will be used to run using a periodic job as well.
- Write API test