A system doing house-keeping jobs like removing old backups, stale edit locks, etc.

What I'd like here is something that would not require cron nor a demon, but works behind the scenes per request. Apart from this, you can always call a CLI interface of the house-keeping system doing all the work in one rush (moin-maint).

The idea is to implement this as a FOLDOC:FSM, and yield()ing after small steps (like deleting a backup file). Thus, we can limit the time spent on house.keeping to a few secs, without blocking the httpd slot for too long. The state of the FSM is persisted to a pickle. Behind-the-scenes house-keeping would happen after the page has been flushed to the browser.

Why all this fuss?

All this needs file locking, but we need that anyway for other features.

Why not forking into a second process that does the work? This would not slow down the request, that finds the "It's time again" condition true, but would keep the house-keeping code simple and avoid yielding and the FSM, which seams unnatural for the task for me -- FlorianFesti 2003-03-29 12:19:17

MoinMoin: MoinMoinTodo/WikiMaintenance (last edited 2007-10-29 19:16:49 by localhost)