I have an initial implementation that combs through the preview sessions and removes anything that's been untouched for more than X days. It's on lalashan, but so far isn't being called by anything. I've just sent a rambling email about it to the workingwiki-users list:
This is being called now on every page view. Generally it's a no-op, because it remembers the last time it ran and doesn't run again until a week has passed.
This is probably good for a default behavior, so people who install don't have to jump through a lot of hoops, but it's probably better for performance to disable running it on page views and run it every night via cron instead. The facility is there to do that, so it's up to the system admin. (I should do it on lalashan.)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have an initial implementation that combs through the preview sessions and removes anything that's been untouched for more than X days. It's on lalashan, but so far isn't being called by anything. I've just sent a rambling email about it to the workingwiki-users list:
https://sourceforge.net/mailarchive/forum.php?thread_name=4D9150D1.8040405%40gmail.com&forum_name=workingwiki-users
This is being called now on every page view. Generally it's a no-op, because it remembers the last time it ran and doesn't run again until a week has passed.
This is probably good for a default behavior, so people who install don't have to jump through a lot of hoops, but it's probably better for performance to disable running it on page views and run it every night via cron instead. The facility is there to do that, so it's up to the system admin. (I should do it on lalashan.)
It still needs to do something about old persistent directories and orphaned background jobs.
Also, it needs locking so it doesn't get tangled up if two processes try to do it at once, particularly on a multiheaded system like yushan.
(I'm sure it's basically fine if it runs without locking, but I should do it right.)