[klutz] Comics Update

Marcus I. Ryan marcus at horde.org
Wed Sep 29 12:16:13 PDT 2004


   Try what I just committed.

   That said, PLEASE do not set your klutz to update all comics for all dates
every time you run the cron job as you seem to be doing.  That's incredibly
rude to the sites you fetch images from as there are 22 comics already set in
comics.php.dist that are 'random', i.e. they don't appear every day.  If, for
instance, you have 1 comic marked random that only posts 3 times a week and
you keep a backlog of 1 year of comics, it will send 208 requests to the
website (and generate 208 errorlog entries on their server) every time the
script is run.  Do that for 22 comics and you're talking 4576 invalid web
requests per run.  And some sites run their scripts (e.g. me) more than once
a day (already a little questionable courtesy). If you ran it every 6 hours,
that's 18304 error entries a day.  You see how this can quickly and easily
snowball.

   I'd rather see you do no more than a single day back in your script files
and use the web interface for any more than that.  Usually if you can't fetch
the image after a day, it's a URL error or similar error that won't improve
with multiple attempts to fetch.  You will need to use two scripts with two
$date settings for this until I get time to really rework klutz.

--
Marcus I. Ryan, marcus at horde.org
--------------------------------------------------------------------
Hanlon's Razor:  Never attribute to malice that which is adequately
explained by stupidity.
--------------------------------------------------------------------


Quoting "Jorge Manuel B. S. Vicetto" <jmbsvicetto at esenfah.pt>:

> Hi!
>
> I'm sorry for asking this again, but I've only saw this question 
> being made by
> Charles Andrews on Aug 6, 2004 and he didn't get any answer. I've looked back
> in the archives until Feb 3, 2003 and didn't saw any answer.
> So, can you please explain how to change the scripts to get the 
> comics for all
> the dates?
> I think that the cli-backend.sh just requires setting the URL to something as
>
> URL="HTTP://HOSTNAME/horde/klutz/backend.php?mode[]=fetch&mode[]=delete&date=all"
>
> , but for the sake of me and due to my very rusty php skills, I just 
> can't see
> how to change the cli-backend.php.
>
> This surely doesn't work, at least for me:
>
> $mode = array('fetch', 'delete');
> $date = 'all';
> require KLUTZ_BASE . '/backend.php';
>
> Thank you.
>
>
> ------------------------------------------
>
> Jorge Manuel B. S. Vicetto
> Network Manager and Systems Administrator
> Angra do Heroísmo Nursing School (ESEnfAH)
>
> ------------------------------------------
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>





More information about the klutz mailing list