Igor Gariev (gariev) wrote in changelog,
Igor Gariev
gariev
changelog

[fotobilder] r1446: if FB memcache is not configured, use LJ...

Committer: gariev
if FB memcache is not configured, use LJ memcache servers
U   trunk/lib/startup.pl
Modified: trunk/lib/startup.pl
===================================================================
--- trunk/lib/startup.pl	2011-05-26 06:51:05 UTC (rev 1445)
+++ trunk/lib/startup.pl	2011-05-26 06:53:45 UTC (rev 1446)
@@ -15,6 +15,17 @@
 require "$ENV{'FBHOME'}/lib/lang.pl";
 require "$ENV{'LJHOME'}/cgi-bin/ljlib.pl";
 
+## set up memcached servers if they are not set already
+if (!@FB::MEMCACHE_SERVERS) {
+    ## try to use servers from LJ config
+    @FB::MEMCACHE_SERVERS = @LJ::MEMCACHE_SERVERS;
+    if (@FB::MEMCACHE_SERVERS) {
+        FB::MemCache->reload_conf;
+    } else {
+        warn "Memcache is not configured in your Fotobilder installation";
+    }
+}
+
 # setup httpd.conf things for the user:
 LJ::Request->add_httpd_conf("DocumentRoot $FB::HOME/htdocs");
 LJ::Request->add_httpd_conf("ServerAdmin $FB::ADMIN_EMAIL")

Tags: fotobilder, gariev, pl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments