index : archweb32 | |
Archlinux32 website | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2019-02-13 08:34:10 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-02-13 08:34:10 +0100 |
commit | f5175dca32467dbfecfc1d058b99e7b0a19b9764 (patch) | |
tree | c2929084babb8ff3854318adf2131a75fef16ae7 /buildmaster | |
parent | c8e86055394702bd8e257f78ff9a4a787116253d (diff) |
-rw-r--r-- | buildmaster/deletion-links.php | 15 |
diff --git a/buildmaster/deletion-links.php b/buildmaster/deletion-links.php index 9f55c89..f474dc5 100644 --- a/buildmaster/deletion-links.php +++ b/buildmaster/deletion-links.php @@ -16,8 +16,13 @@ else $filter = ""; $memcache = new Memcache; -$memcache -> connect('localhost', 11211) or die ('Memcached Connection Error'); -$available_upstream_packages = $memcache -> get('available_upstream_packages'); +if ($memcache -> connect('localhost', 11211)) { + $memcache_available = true; + $available_upstream_packages = $memcache -> get('available_upstream_packages'); +} else { + $memcache_available = false; + $available_upstream_packages = false; +} if ($available_upstream_packages === false) { $available_upstream_packages = explode( "\n", @@ -27,9 +32,11 @@ if ($available_upstream_packages === false) { "| sort -u" ) ); - $memcache -> set('available_upstream_packages',$available_upstream_packages,0,1800); + if ($memcache_available) + $memcache -> set('available_upstream_packages',$available_upstream_packages,0,1800); } -$memcache -> close(); +if ($memcache_available) + $memcache -> close(); mysql_run_query( "CREATE TEMPORARY TABLE `available` (" . |