• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

test please delete

Collapse
This is a sticky topic.
X
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    I see the news in the sidebar is updating

    The funny thing about that is that it could have been working all along

    When admin (of blessed memory) and I set it up some years ago, I had it working by fetching the CUK main site's RSS feed and updating with any new stories. But when we deployed it to the server, it didn't work. It turned out that admin had various firewall rules set up to protect the server and one of them was blocking it from fetching the feed over the web.

    It was late and we'd already been working on forum deployment stuff for hours, so we went for a quick and easy fix: he set up a cron job, which was exempt from the relevant firewall rule, which fetched the feed and saved it to the server. Then my scheduled task could read that file and update the news that way.

    When admin moved on, the new administrators moved things over to their container-based systems. But they missed the cron job, because I suppose they never thought to look and admin had probably forgotten all about it. So the news remained stuck because the file was never updated.

    Anyway, yesterday when I'd sorted out the memcache stuff, I went and had a look at the code for updating the news; I was wondering if I could work out how to get it working. I'd also forgotten all of the above. But what did I see: the line that fetched the RSS feed directly, commented out, above the three or so lines that got it from the file

    So I commented out the stuff for reading the file, and uncommented the original line that fetches the feed directly, and it works!

    We should probably have documented this stuff but as I say, it was late

    Comment


      The afternoon did indeed see the clouds part and some sunshine break through.

      I have been working with my crayons all day trying to depict a lot of information in a visually pleasing manner.

      Comment


        Tea has been pork cutlet with chips and beans

        Accompanied by the final part of Inside Barlinnie. Some very interesting stuff about the special unit they had for the absolute worst people in the 1970s and 1980s, where the prisoners and staff ran the unit in collaboration and it was very laissez faire; out of those who passed through it (including Jimmy Boyle), only four ever reoffended

        Comment

        Working...
        X