From 0b8067be438744ccf0c0062bee5996cab8403df0 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 14 Apr 2015 14:05:59 +0100 Subject: [PATCH] fix bug in overrunning sparql dos problem --- bin/run-all | 18 +++++++++++------- etc/feeds.csv | 3 +++ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/bin/run-all b/bin/run-all index 82e5536..356b3e4 100755 --- a/bin/run-all +++ b/bin/run-all @@ -22,6 +22,17 @@ global $diary_config; $diary_config["path"] = dirname(dirname(__FILE__)); require($diary_config["path"].'/etc/config.php'); + +$graph = new Graphite(); +if( $diary_config["fn_loadExtraTriples"] ) +{ + $fn = $diary_config["fn_loadExtraTriples"]; + $fn( $graph ); + # save the extra triples so that the scrapers can use them + $frozen_fn = $diary_config["path"]."/var/frozen-extraTriples"; + $graph->freeze( "$frozen_fn" ); +} + # Run all of the scrapers. exec_command( $diary_config["path"]."/bin/run-scrapers" ); # not passing $1 anymore @@ -37,13 +48,6 @@ exec_command( "cat ".$diary_config["path"]."/var/output/* | ".$diary_config["rap # Freeze the graph. -$graph = new Graphite(); - -if( $diary_config["fn_loadExtraTriples"] ) -{ - $fn = $diary_config["fn_loadExtraTriples"]; - $fn( $graph ); -} $fn = $diary_config["path"]."/htdocs/diary.rdf"; $failsafe_fn = $diary_config["path"]."/var/volatile.ttl"; diff --git a/etc/feeds.csv b/etc/feeds.csv index f0671b4..1ef9087 100644 --- a/etc/feeds.csv +++ b/etc/feeds.csv @@ -1,4 +1,5 @@ "Feed ID",Site,"Feed Name","Feed URL",Faculty/Unit/Group,Script,Type,Notes,Tags,"Time Limit" +enabling-services,Enabling Services,"Events from Enabling Services",http://www.southampton.ac.uk/edusupport/news/feeds/eventsfeed.page,http://id.southampton.ac.uk/org/PKEW190000,RSSLiveSite,Event,,, staffbook,StaffBook,"Events from PDU StaffBook",https://www.staffbook.soton.ac.uk/events_feed.php,http://id.southampton.ac.uk/org/P1GRDD0850,StaffBookJSON,Event,,, ageing-events,Ageing,"Events from Ageing/Gerontology",http://www.soton.ac.uk/ageing/news/feeds/gerontology_events.page,http://id.southampton.ac.uk/org/F8CC060000,RSSLiveSite,Event,,, ageing-seminars,Ageing,"Seminars from Ageing/Gerontology",http://www.soton.ac.uk/ageing/news/feeds/gerontology_seminars.page,http://id.southampton.ac.uk/org/F8CC060000,RSSLiveSite,Seminar,,, @@ -89,3 +90,5 @@ cite,CITE,"Centre for Innovation in Technology and Education",https://www.cite.s multidisciplinary-events,Multidisciplinary,"Multidisciplinary Events",http://www.southampton.ac.uk/multidisciplinary/news/feeds/multidisciplinary_events.page,,RSSLiveSite,Event,,, sustainability-science,"Sustainability Science","Sustainability Science Events",http://www.southampton.ac.uk/sustainability_science/news/feeds/events_from_sustainability_at_southampton.page,,RSSLiveSite,Event,,, unionfilms,"Union Films","Union Films",http://www.unionfilms.org/feeds/Union_Films.ics,http://id.southampton.ac.uk/org/SU,ICS,Event,,, +wsi,WSI,,http://www.southampton.ac.uk/wsi/news/feeds/wsi_events.page,,RSSLiveSite,Event,,, +per,"Public Engagement with Research","Public Engagement with Research",http://www.southampton.ac.uk/per/news/feeds/eventsfeed.page,,RSSLiveSite,Event,,,