Misago icon indicating copy to clipboard operation
Misago copied to clipboard

Create hidden "garbage bin" category, move threads to it before deleting them

Open rafalp opened this issue 7 years ago • 3 comments
trafficstars

Bulk thread deletion may be costful and slow if moderator deletes thread with plenty of posts, but this can be improved by changing thread deletion action to actually move the thread to hidden category invisible to all users instead of deleting it on HTTP thread.

This category could then be pruned automatically by either cron job or celery task.

rafalp avatar Mar 26 '18 20:03 rafalp

In order to accomplish this, would it be this function that would need to be modified to move the thread to that garbage category first instead of deleting?

And would something like this be an example of a celery task that this might be based on?

AetherUnbound avatar Aug 20 '19 19:08 AetherUnbound

Yup, delete_thread should use the thread.move() instead of thread.delete(). As for creating celery task, you can take inspiration from that one, yes. Even simpler would be to abuse prunethreads management command by setting prune_replied_after for garbage bin category. ;)

rafalp avatar Aug 21 '19 16:08 rafalp