is/was there ever a way to delete old / unused pads or were they just piling up in the database?
thanks
Jens-Christian
> is/was there ever a way to delete old / unused pads or were they
> just piling up in the database?
etherpad/src/etherpad/pad/dbwriter.js:taskCheckForStalePads().
writePadNow(pad, true); does the deletion.
- Chris.
--
Chris Ball <c...@laptop.org>
One Laptop Per Child
the function identified by Chris seems to be some kind of garbage
collection to clean up the memory. There seems to be no modification
of the database. I found many of the corresponding entries in my
logfile - but my pads are still accessable.
Reading the faq-entry at etherpad.com (http://etherpad.com/ep/about/
faq#lifetime) I would not hope for any code to terminate pads. As far
as I understand the software by now, you have to remove the pads from
the database. I'm still trying to understand, which tables are
affected.
Regards from Germany
Michael
Chris Ball schrieb:
(I'm afraid to try that on my etherpad instance.)
How hard is it to set up several etherpad instances
running on the same machine...
add this to trunk/etherpad/src/etherpad/control/pad/pad_control.js :
function render_delete_post() {
var localPadId = request.params.padIdToDelete;
model.accessPadGlobal(localPadId, function(pad) {
collab_server.bootUsersFromPad(pad, "deleted");
pad.destroy();
});
dbwriter.taskFlushPad(localPadId, "delete");
response.redirect(request.params.returnPath);
}
then in html, you can do:
<form action="/ep/pad/delete" method="post" id="delete-pad">
<input type="hidden" name="returnPath" value="<%= request.url %>" />
<input id="padIdToDelete" name="padIdToDelete" type="hidden" value="<
%=THE_PAD_ID %>" />
<input type="submit" value="delete"/>
</form>
On Mar 5, 12:42 am, Daniel Reeves <dree...@gmail.com> wrote:
> A related question: What is the SQL (and perhaps search&replace)
> magic to rename a pad? (You could of course just create a new one and
> copy-paste, but that would lose the history and colors.) This would
> be about as good as deleting a pad since you could rename foo to
> trash-foo and have foo be a blank slate with no history. Also, no
> worries about someone stumbling on trash-foo (especially if you made
> it trash-foo-somerandomstring).
>
>
>
> On Tue, Mar 2, 2010 at 5:59 PM, Daniel Reeves <dree...@gmail.com> wrote:
> > I wanted to resurrect this thread to see if anyone has worked out the
> > SQL magic to obliterate a pad.
> > What would happen if I just deleted the appropriate row from PAD_SQLMETA like
> > delete from PAD_SQLMETA where id = padidontwant;
>
> > (I'm afraid to try that on my etherpad instance.)
>
1) Would it be possible to make the function redirect the user back
to the "Pad selection screen"?
2) How are you obtaining THE_PAD_ID if the PAD_ID value is a pro
account (IE prefixed)
<form action="/ep/pad/delete" method="post" id="delete-pad">
<input type="hidden" name="returnPath" value="<%= request.url %>" />
<input id="padIdToDelete" name="padIdToDelete" type="hidden"
value="< %=localPadId %>" />
<input type="submit" value="delete pad"/>
</form>
to pad_body2.ejs
and
function render_delete_post() {
var localPadId = request.params.padIdToDelete;
model.accessPadGlobal(localPadId, function(pad) {
collab_server.bootUsersFromPad(pad, "deleted");
pad.destroy();
});
dbwriter.taskFlushPad(localPadId, "delete");
response.redirect(request.params.returnPath);
}
to trunk/etherpad/src/etherpad/control/pad/pad_control.js
I then created a new pad and tried to delete it (using the button) but
I got an error when it tried to load the page:
http://primarypad2.com/ep/pad/delete
404 not found: /ep/pad/delete
Have you missed a step out?
Thanks, J
I've also stopped using etherpad after this experiment, so I probably
wont have any more info