Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
Merge pull request #2759 from andymckay/1106198
Browse files Browse the repository at this point in the history
make monitor pass under docker (bug 1106198)
  • Loading branch information
Andy McKay committed Dec 1, 2014
2 parents bb19cec + 45391a1 commit 2baca93
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ ENV CLEANCSS_BIN /srv/zamboni-node/node_modules/clean-css/bin/cleancss
ENV ES_HOST elasticsearch:9200
ENV MARKETPLACE_URL http://mp.dev
ENV MEMCACHE_URL memcached:11211
ENV REDIS_URL redis://redis:6379?socket_timeout=0.5
ENV SOLITUDE_URL http://solitude:2602
ENV STYLUS_BIN /srv/zamboni-node/node_modules/stylus/bin/stylus
ENV UGLIFY_BIN /srv/zamboni-node/node_modules/uglify-js/bin/uglifyjs
Expand Down
5 changes: 4 additions & 1 deletion mkt/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,10 @@ def JINJA_CONFIG():
REDIRECT_URL = 'http://outgoing.mozilla.org/v1/'
REDIRECT_SECRET_KEY = ''

REDIS_BACKENDS = {'master': 'redis://localhost:6379?socket_timeout=0.5'}
REDIS_BACKENDS = {
'master': os.environ.get('REDIS_URL',
'redis://localhost:6379?socket_timeout=0.5')
}

# Allow URLs from these servers. Use full domain names.
REDIRECT_URL_WHITELIST = ['addons.mozilla.org']
Expand Down
6 changes: 5 additions & 1 deletion mkt/site/monitors.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ def memcache():
s.close()

memcache_results.append((ip, port, result))
if not using_twemproxy and len(memcache_results) < 2:
if (not using_twemproxy
and len(hosts) > 1
and len(memcache_results) < 2):
# If the number of requested hosts is greater than 1, but less
# than 2 replied, raise an error.
status = ('2+ memcache servers are required.'
'%s available') % len(memcache_results)
monitor_log.warning(status)
Expand Down
1 change: 1 addition & 0 deletions tmp/uploads/collection_icons/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
stub file to create an empty dir
1 change: 1 addition & 0 deletions tmp/uploads/reviewer_attachment/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
stub file to create an empty dir

0 comments on commit 2baca93

Please sign in to comment.