The Web as filtered (and hopefully enriched ;-) by Adrian McEwen

Your First Assumption Should Be "It's My Fault"

When writing code, it’s always a good idea to remember that when things aren’t behaving as you expect then the chances are you’ve done something wrong. Unfortunately, it’s always tempting to try to explain it away as a bug in someone else’s code, or that there’s some other reason that lets you off the hook.

I try not to fall into that trap, but in my rush to get NewMusicRadio finished over the weekend I succumbed. I let myself think that the reason the cron job was taking most of the day to check a few websites was either NTL being flakey as usual, or that some of the MP3 blogs had some form of advanced wget detection script running which left connections hanging for ages.

Stupid Adrian. A brief look into it this morning shows there’s some problem with using the --ignore-length option of wget that results in neither wget nor the web server realising that the transfer has finished in some cases.

So, until I get some time to either work out how to stop the connections hanging, or code an alternative approach to deleting tracks, I’ve removed the --ignore-length options from the example cron script so the delete functionality won’t work.

This page is part of Adrian McEwen's blog, McFilter. Explore more in the category pages or archives below.

Subscribe to updates with the RSS feed (what's an RSS feed?)