Skip to content
Browse files

Switching from 64 free sites to 12 to handle load.

  • Loading branch information...
1 parent e4fc8b6 commit f5ec4fa37d0a8172173b3fb43d305bb4a03816f9 @samuelclay committed
Showing with 22 additions and 10 deletions.
  1. +17 −5 fabfile.py
  2. +3 −3 media/js/newsblur/reader/reader.js
  3. +2 −2 media/js/newsblur/reader/reader_feedchooser.js
View
22 fabfile.py
@@ -60,12 +60,20 @@
'task10.newsblur.com',
'task11.newsblur.com',
],
+ 'ec2app': ['ec2-54-242-38-48.compute-1.amazonaws.com',
+ 'ec2-54-242-34-138.compute-1.amazonaws.com',
+ ],
'ec2task': ['ec2-54-242-38-48.compute-1.amazonaws.com',
'ec2-184-72-214-147.compute-1.amazonaws.com',
'ec2-107-20-103-16.compute-1.amazonaws.com',
'ec2-50-17-12-16.compute-1.amazonaws.com',
'ec2-54-242-34-138.compute-1.amazonaws.com',
'ec2-184-73-2-61.compute-1.amazonaws.com',
+
+ # New post Reader shut-down
+ 'ec2-50-17-135-87.compute-1.amazonaws.com',
+ 'ec2-50-16-7-166.compute-1.amazonaws.com',
+ 'ec2-54-234-182-177.compute-1.amazonaws.com',
],
'vps': ['task01.newsblur.com',
'task03.newsblur.com',
@@ -84,8 +92,8 @@
# ================
def server():
- env.NEWSBLUR_PATH = "/home/%s/newsblur" % env.user
- env.VENDOR_PATH = "/home/%s/code" % env.user
+ env.NEWSBLUR_PATH = "/srv/newsblur"
+ env.VENDOR_PATH = "/srv/code"
def app():
server()
@@ -111,6 +119,10 @@ def ec2task():
ec2()
env.roles = ['ec2task']
+def ec2app():
+ ec2()
+ env.roles = ['ec2app']
+
def vps():
server()
env.roles = ['vps']
@@ -402,6 +414,7 @@ def setup_repo():
with settings(warn_only=True):
run('git clone https://github.com/samuelclay/NewsBlur.git newsblur')
sudo('mkdir -p /srv')
+ sudo('ln -f -s /home/%s/code /srv/code' % env.user)
sudo('ln -f -s /home/%s/newsblur /srv/newsblur' % env.user)
def setup_repo_local_settings():
@@ -730,7 +743,7 @@ def setup_mongo():
sudo('/etc/init.d/mongodb restart')
def setup_redis():
- redis_version = '2.6.2'
+ redis_version = '2.6.11'
with cd(env.VENDOR_PATH):
run('wget http://redis.googlecode.com/files/redis-%s.tar.gz' % redis_version)
run('tar -xzf redis-%s.tar.gz' % redis_version)
@@ -834,7 +847,7 @@ def copy_task_settings():
# = Setup - EC2 =
# ===============
-def setup_ec2_task():
+def setup_ec2():
AMI_NAME = 'ami-834cf1ea' # Ubuntu 64-bit 12.04 LTS
# INSTANCE_TYPE = 'c1.medium'
INSTANCE_TYPE = 'c1.medium'
@@ -863,7 +876,6 @@ def setup_ec2_task():
host = instance.public_dns_name
env.host_string = host
- setup_task()
# ==============
View
6 media/js/newsblur/reader/reader.js
@@ -888,7 +888,7 @@
$progress.addClass('NB-progress-error').addClass('NB-progress-big');
$('.NB-progress-link', $progress).html($.make('div', {
className: 'NB-modal-submit-button NB-modal-submit-green NB-menu-manage-feedchooser'
- }, ['Choose your 64 sites']));
+ }, ['Choose your 12 sites']));
this.show_progress_bar();
},
@@ -918,7 +918,7 @@
NEWSBLUR.assets.folders.length) {
_.defer(_.bind(this.open_feedchooser_modal, this), 100);
} else if (!NEWSBLUR.Globals.is_premium &&
- NEWSBLUR.assets.feeds.active().length > 64) {
+ NEWSBLUR.assets.feeds.active().length > 12) {
_.defer(_.bind(this.open_feedchooser_modal, this), 100);
}
},
@@ -2638,7 +2638,7 @@
]),
(show_chooser && $.make('li', { className: 'NB-menu-item NB-menu-manage-feedchooser' }, [
$.make('div', { className: 'NB-menu-manage-image' }),
- $.make('div', { className: 'NB-menu-manage-title' }, 'Choose Your 64 sites'),
+ $.make('div', { className: 'NB-menu-manage-title' }, 'Choose Your 12 sites'),
$.make('div', { className: 'NB-menu-manage-subtitle' }, 'Enable the sites you want.')
])),
$.make('li', { className: 'NB-menu-separator' }),
View
4 media/js/newsblur/reader/reader_feedchooser.js
@@ -10,14 +10,14 @@ NEWSBLUR.ReaderFeedchooser.prototype = {
runner: function() {
this.start = new Date();
- this.MAX_FEEDS = 64;
+ this.MAX_FEEDS = 12;
this.approve_list = [];
this.make_modal();
this.make_paypal_button();
_.defer(_.bind(function() { this.open_modal(); }, this));
if (!NEWSBLUR.Globals.is_premium) {
this.find_feeds_in_feed_list();
- this.initial_load_feeds();
+ this.initial_load_feeds(true);
}
this.choose_dollar_amount(2);

0 comments on commit f5ec4fa

Please sign in to comment.
Something went wrong with that request. Please try again.