Insane stroage folder size (5gb)
I kept running out of space, so I happened to be hunting around for ways to clear up my macbook, then I discovered this haha
There were something like 90k files. I haven't actually used clockwork in a few months, but clearly it's collecting a lot of data behind the scenes.
Nothing else I'm using came close - maybe it should/could perodically clean itself? Hook into migrate:fresh or some other hook that other packages must be using?
Feel free to close if this is just clutter - I just figured maybe no one is aware of it and there might be an easy fix.
Hey, by default Clockwork is enabled when your app is running in the debug mode (APP_DEBUG), you can explicitly enable or disable it be setting CLOCKWORK_ENABLE to true or false.
Metadata older than 7 days should be automatically cleaned up by default, you can control this interval by setting CLOCKWORK_STORAGE_EXPIRATION, eg. setting it to 60 will automatically clean up metadata older than one hour.
Obviously this isn't metadata then, or else I wouldn't (shouldn't) have files going back to when I first installed Clockwork 3 years ago.
If I didn't need Clockwork's functionality I wouldn't have installed it, and it shouldn't be necessary to disable its functionality just to prevent my web directory from becoming cluttered with a multi-gigabyte folder. At the moment it's not entirely clear what the purpose of this directory is and whether it's safe to manually delete the files. If it's just a cache then a multi-gigabyte cache is annoying but easily solvable by adding something to the docs at the very least, and ideally Clockwork should have some garbage collection that automates this. If it isn't and deleting those files will prevent Clockwork from operating as it should, then it seems like something is wrong with how Clockwork is written if it needs over 100,000 JSON files to do so.
Solved thanks to the artisan clockwork:clean command referenced in https://github.com/itsgoingd/clockwork/issues/140, which I couldn't find at first due to it not being clear that these were logs at all. After taking about 10 minutes to run, my clockwork folder is down to less than 10MB... until the next time, I suppose.