Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a CLI to remove temporary files #66

Merged
merged 1 commit into from
Feb 26, 2020
Merged

Conversation

NeilPeyssard
Copy link

No description provided.


foreach ($this->storage->all() as $filePath) {
$this->storage->remove($filePath);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

attention il ne faut pas tout supprimer, seuls les vieux fichiers doivent etre supprimés
d'autre part, il faut aussi suppirmer les entités liés aux fichiers

pour moi, il faut un paramètre optionnel permettant de définir l'age des fichiers à supprimer, et supprimer uniquement ceux la. Si option vide, on supprime tout.

idée pour le format de l'option : --older-than=3d
ping @Vowow

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@juchi Ok aussi ça permet d'être plus précis si besoin

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok pour le paramètre older-than, c'est corrigé :)

On est d'accord que dans ce cas l'objectif est de supprimer les fichiers temporaires (qui ne sont donc plus utilisés) ? Pour moi ils ne sont liés à aucune entité, puisque les fichiers réellement uploadés sont copiés dans un autre répertoire au moment de la création de l'entité.

@Vowow Vowow merged commit e3d5f45 into master Feb 26, 2020
@Vowow Vowow deleted the feature/remove_tmp_files_cli branch February 26, 2020 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants