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 CLI command core:clear-tmp #6402

Open
gaumondp opened this issue Oct 8, 2014 · 5 comments
Open

Add CLI command core:clear-tmp #6402

gaumondp opened this issue Oct 8, 2014 · 5 comments
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.

Comments

@gaumondp
Copy link

gaumondp commented Oct 8, 2014

We already got "./console core:clear-caches", maybe we should get also a "./console core:clear-tmp" and call that one after activation-deactivation of plugins and upgrade. Or implicitly add the clearing of /tmp to "./console core:clear-caches".

BTW a web page with all the CLI commands would be useful(mainly the "core" part) even if typing "./console list" gives us the full possibilities when we are already connected in SSH...

@tsteur
Copy link
Member

tsteur commented Oct 9, 2014

Clearing whole tmp directory on top in clear-caches sounds good. BTW: If you need this functionality now this plugin might be useful: http://plugins.piwik.org/cacheBuster

@gaumondp
Copy link
Author

gaumondp commented Oct 9, 2014

Frankly if I'm doing Piwik work, I will always be logged in via SSH and ready to "rm -rf *" inside the temp directory...

I just find it "cleaner" to wipe both directories since the price to pay isn't that much. Maybe I just read too much Forum posts with Matt saying to clear /tmp/ to resolve problems.
;)

I don't know Piwik's internals but if it's not the case, cleaning /tmp/ and caches implicitly when updating Piwik or installing-deinstalling a plugin seems like some extra operations to do everytime. You don't do that everyday as long as you're not a Dev...

@mattab
Copy link
Member

mattab commented Nov 3, 2014

Thanks for the suggestion @gaumondp

I can still see the value for deleting it from time to time, for example on shared hosting where space is limited. Although I would ideally prefer not to add the command and instead go after each Bug where the tmp/ folder is out of sync. AFAIK we try to fix those problems so that the tmp folder is cleared whenever necessary.

of course If you or anyone has use case for this new command, let us know here!

@mattab mattab added the Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. label Nov 3, 2014
@mattab mattab added this to the Mid term milestone Nov 3, 2014
@gaumondp
Copy link
Author

gaumondp commented Nov 3, 2014

Again, not a problem for me but I was just looking at /tmp/assets/ and saw 25 MB of PDF reports sleeping there... I could imagine someone adding a cron job every week with /console core:clear-caches to take care of this (or maybe we can provide a FAQ on how to setup a cron cleanup of /tmp/assets/)

I still think whipping /tmp/ on Piwik's update and plugin activation should be added though...

@tsteur
Copy link
Member

tsteur commented Nov 3, 2014

👍 for cleaning at least on Piwik's update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

No branches or pull requests

4 participants