GithubHelp home page GithubHelp logo

tobiasd / statexpire Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tonybaldwin/statexpire

0.0 2.0 0.0 168 KB

statusnet expire - expires statusnet updates after a given period (3 months) to keep db from growing infinitely/conserve storage

PHP 100.00%

statexpire's Introduction

StatusExpire.php by tony baldwin | www.tonybaldwin.me released according to the Gnu Affero Public License, v. 3

Expires statusnet updates after a given period (here, 3 months, but you can edit that). You will have to edit the script to reflect your DBNAME, USERNAME, and PASSWORD, plus, of course, you can change the value in $oldate=date((Ymd), strtotime('-3 months')); from -3 months to whatever you like. Could be -10 days, -1 year, -6 months, whatever, and the script will delete updates older than that given value.

The statexpire.php is to be run from the command line with /usr/bin/php /path/to/statexpire.php not to be run in a browser. As such, it requires php-cli, but statusnet already requires that to run other scripts. I recommend sticking it in /statusnet/scripts/

You could have a cronjob do it:

0 0 1 * * /usr/bin/php /var/www/statusnet/scripts/statexpire.php

or some such thing.

statexpire's People

Watchers

Tobias Diekershoff avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.