mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2026-01-02 15:31:24 +00:00
Add cron job for removing expired stored objects
Introduced `RemoveExpiredStoredObjectCronJob` to automate the deletion of expired stored objects every 7 days. Enhanced associated tests and updated relevant interfaces and classes to support the new cron job functionality.
This commit is contained in:
@@ -39,7 +39,9 @@ interface StoredObjectManagerInterface
|
||||
public function read(StoredObject|StoredObjectVersion $document): string;
|
||||
|
||||
/**
|
||||
* Set the content of a StoredObject.
|
||||
* Register the content of a new version for the StoredObject.
|
||||
*
|
||||
* The manager is also responsible for registering a version in the StoredObject, and return this version.
|
||||
*
|
||||
* @param StoredObject $document the document
|
||||
* @param string $clearContent The content to store in clear
|
||||
@@ -52,6 +54,11 @@ interface StoredObjectManagerInterface
|
||||
public function write(StoredObject $document, string $clearContent, ?string $contentType = null): StoredObjectVersion;
|
||||
|
||||
/**
|
||||
* Remove a version from the storage.
|
||||
*
|
||||
* This method is also responsible for removing the version from the StoredObject (using @see{StoredObject::removeVersion})
|
||||
* in case of success.
|
||||
*
|
||||
* @throws StoredObjectManagerException
|
||||
*/
|
||||
public function delete(StoredObjectVersion $storedObjectVersion): void;
|
||||
|
||||
Reference in New Issue
Block a user