Open VincentMarmiesse opened 4 years ago
Hi, I'm facing same kind of issues, include the cache folder in iteration seems not to be the best solution... I'm working on an update without the cache (we still can flush it after using Magento admin option) in which I will add your very good idea of limit option. Thanks a lot
Hi, Could you test the dev branch version ? there is 2 options in the command line :
You could combine both options
php bin/magento cap:clean:media --dry-run --limit=10
The slowest part of the previous command was the double media folder iteration... I also removed the database cleaner part for now (explain in the README.md)
Thanks
Wouldn't it make more sense to check for each file in the database if it actual exists on the disk and then delete it? In that case there's no need to do the media folder iteration.
Hi,
It would be nice to have an option to limit the number of files the command browses. I just runned it on a Magento with 5M+ files and the NFS server is running down.
Maybe something like
php bin/magento cap:clean:media --limit=XXX
.