From: Michael Wallner Date: Wed, 13 May 2015 13:22:26 +0000 (+0200) Subject: try available cache storages X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=2671ece02c6925d429378ce412dd782a92ba9bc7;p=pharext%2Fpharext.org try available cache storages --- diff --git a/app/bootstrap/github.php b/app/bootstrap/github.php index 30bd96d..e0defa7 100644 --- a/app/bootstrap/github.php +++ b/app/bootstrap/github.php @@ -17,12 +17,20 @@ $injector->share(Github\API::class) 0); } // FIXME: configure through app.ini + try { + $cache = new Github\Storage\Redis("gh-cache"); + } catch (\Exception $ex) { + try { + $cache = new Github\Storage\Memcache("gh-cache"); + } catch (\Exception $ex) { + $cache = null; + } + } return new Github\API( $config->github ,new Github\Logger($config) ,new Github\Storage\Session("gh-tokens") - #,new Github\Storage\Memcache("gh-cache") - ,new Github\Storage\Redis("gh-cache") + ,$cache ); }); diff --git a/app/views/alert.phtml b/app/views/alert.phtml index 2a12f16..8a5a45a 100644 --- a/app/views/alert.phtml +++ b/app/views/alert.phtml @@ -12,7 +12,5 @@

Stack Trace

-
e($exception->getTraceAsString()) ?>
-

Full Dump

-
e($exception) ?>
+
e($exception) ?>
diff --git a/config/sql/001.sql b/config/sql/001.sql index 241b38d..ddf5d03 100644 --- a/config/sql/001.sql +++ b/config/sql/001.sql @@ -26,5 +26,5 @@ create table owners ( ,login text not null ,owner jsonb ,primary key (account,authority) - ,unique key (login,authority) + ,unique (login,authority) );