moo.sdk.recovery

Non-destructive object recovery.

@recycle is destructive — a permanent Django delete with no recovery. Author recovery of a griefed building and the reaper’s “freeze, don’t delete” both want a reversible path. This module is that path: soft_recycle() retains the object’s id and inbound references but hides it from the world, restore() brings it back, and destroy() is the genuine hard delete that remains for real removal. sweep_recycled() purges anything left recycled past the retention window.

Functions

destroy(obj)

Hard-delete an object permanently (the irreversible path).

get_recycled([owner])

List soft-recycled objects (optionally for one owner) for recovery.

restore(obj[, location])

Restore a soft-recycled object, re-consuming a quota slot.

soft_recycle(obj)

Soft-delete an object: hide it, but keep its id and inbound refs.

sweep_recycled([older_than_days])

Hard-delete objects left recycled beyond the retention window.