# Thanks!

"Ashley M. Kirchner" (ashley@yeehaw.com)
Wed, 13 Dec 1995 08:46:52 PST

- Messages sorted by:[ date ][ thread ][ subject ][ author ]

    On Tue, 12 Dec 1995, Rich Connamacher wrote:

    > > (4)  Object Numbers:  After recycling an object, will it's numbers ever be re-used automatically or is there something specific the Wizard must do?  Also, I've recycled several objects created by Wizard (including a few toaded test characters) however, when I @audit wizard, they appear still in the database but with <invalid-object> as their description.  Should I worry?
    >
    > If you use recycle(), then no, they will never be used again.  That's why
    > you should use $recycler:_recycle and $recycler:_create (did I get those
    > verbs right?)  That keeps the object around, just strips it of everything
    > it has, chparents it to $garbage, and chowns it to Hacker.  _create hands
    > you an object, just like create(), just using a child of $garbage if
    > that's appropriate.

    	Not necessarily true.  When you use hard recycle on an object,
    ;recycle(OBJ), you /can/ get that invalid object back.  Just one thing
    you might want to keep in mind: was it $max_object()?  If you have
    recycled your $max_object(), then there's no need to reclaim it back, you
    can simply type ;reset_max_object(), and your max_object() will become
    the previous number, and nothing will be damaged.  If the number was
    /not/ max_object(), then you could reclaim it if you wanted to.  If you
    decide not to, then you'll have what's known as a "hole".
    	There are quite some discussions out there about such "holes".  Are
    they bad?  Are they ok to leave?  Should I reclaim them and keep a tidy
    database?  Personally, I'd say reclaim them and re-use them.  But I know
    of some people who would say different.  The main reason being: invalid
    objects don't take up database space (not sure about memory usage
    though).  But at the same time, I've also heard that having holes in your
    database, tends to get it corrupted at some point.  Whether this is true
    or not, I don't know, nor was I able to create this situation.
    	Anyways, if you want to reclaim invalid objects, here's a simple
    verb that we had a long time ago on InfernoMOO's $wiz_utils, and I
    believe it was made by yduJ:

    #25:reclaim   this none this
    "$wiz_utils:reclaim($garbage)    => puts it in $recycler.";
    "$wiz_utils:reclaim(<something>) => gives it to you.";
    who = caller_perms();
    if (!valid(parent = {@args, $garbage}[1]))
      return E_INVARG;
    elseif (!(who.wizard || who in this.users))
      return E_PERM;
    elseif (typeof(o = renumber(create(parent))) == ERR)
      "...death...";
    elseif (parent == $garbage)
      $recycler:_recycle(o);
    else
      o.aliases = {o.name = tostr("Resurrectee ", o)};
      $wiz_utils:set_owner(o, who);
      move(o, who);
    endif
    reset_max_object();
    return o;

    [NOTE: This works great if you're on object based.  If you're in a
    byte-based enviroment, you're gonna have to set your .ownership_quota to
    a valid (positive) number before you run this otherwise it'll raise
    E_PERM.  Needless to say, this can only be run by wizards.]

    >
    > > (5)  And last but not least - does anyone know of a way for automatically "cleaning up" the database while the MOO is in operation or am I subject to the database growing in sizes so large that it uses up all my system resources (special thanks to "def" for kinda helping me out on this issue the other night - but how can I, as a Wizard, ensure that once we go live the players will purge their mail (and how can I check?) or is this something the housekeeper will do automatically?)
    >
    > Switch over to a byte based quota system.  That'll limit how much of your
    > system resources that each player can use.  The instructions on how to do
    > that is floating around here somewhere.. I forget myself all of it, and,
    > being in Pine, I can't login to BayMOO to check which names of props are
    > set.  (that's also why I didn't answer the first question, about mail.  I
    > did it but I forget the exact property names)
    >

    	;$player.size_quota = {50000, 0, 0, 0}
    	;for dude in (players()) dude.size_quota = {50000, 0, 0, 0}; endfor
    	(50K would be 50000 as a starting quota)
    	;for dude in (players()) player.ownership_quota = -10000; endfor
    	(why is this being done, I don't know...maybe a LambdaMOO wizard
    	 would like to elaborate on this please?)
    	;$quota_utils = $byte_quota_utils
    	;#80:measurement_task()
    	(this program might give you a lot of junk messages (like empty
    	 properties), and at some times it might even crash...  You're gonna
    	 have ot track down which object it is that it choked on and fix it
    	 manually.  Also, this task will run forever (unless it crashes or you
    	 kill  it)

    	WizAsh@RiverMOO