surrealroad / Safari-Push-Notifications

Reference Server for pushing Safari Notifications via Apple Push Notification Service For use with Safari Push Plugin for Wordpress (https://github.com/surrealroad/wp-safari-push)
23 stars 9 forks source link

Delete push* and push*.zip in the /tmp folder from the server after sending the push. #7

Closed Djibs closed 10 years ago

Djibs commented 10 years ago

Delete push* and push*.zip in the /tmp folder from the server after sending the push.

Files accumulate over time and after a while there is more space.

surrealroad commented 10 years ago

You're referring to the pushpackages? Unfortunately there's no way of knowing how long it will take for someone's browser to download each one. It would probably be possible to periodically scan through and clean up but it doesn't seem worth the effort. I will try to put something in that at least cleans up the files used to build the zip.

Djibs commented 10 years ago

Yes pushpackages* and pushpackages*.zip

Currently, I'm running a cron job every 5 minutes :

/5 * * * * /bin/rm -r /tmp/push

(before the first "/" star and the last does not appear above)

surrealroad commented 10 years ago

https://github.com/surrealroad/Safari-Push-Notifications/commit/3366c873c083417ea0083b7cb236809745f0486b will clear up the directories, I still need to do the code to clean up the zips after a certain time

surrealroad commented 10 years ago

https://github.com/surrealroad/Safari-Push-Notifications/commit/f33c3702df186393359910e66192c6f64889964f should do the trick