mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Toning down the aggresiveness on feed fetching.
This commit is contained in:
parent
df124c8e56
commit
549536753f
5 changed files with 19 additions and 16 deletions
|
@ -708,7 +708,7 @@ class Feed(models.Model):
|
|||
# 2 subscribers:
|
||||
# 1 update per day = 4.5 hours
|
||||
# 10 updates = 55 minutes
|
||||
updates_per_day_delay = 2 * 60 / max(.25, ((max(0, self.active_subscribers)**.20)
|
||||
updates_per_day_delay = 4 * 60 / max(.25, ((max(0, self.active_subscribers)**.20)
|
||||
* (updates_per_day**1.5)))
|
||||
if self.premium_subscribers > 0:
|
||||
updates_per_day_delay /= 6
|
||||
|
@ -718,7 +718,7 @@ class Feed(models.Model):
|
|||
# 7 hours for 2 subscribers.
|
||||
# 3 hours for 3 subscribers.
|
||||
# 25 min for 10 subscribers.
|
||||
subscriber_bonus = 6 * 60 / max(.167, max(0, self.active_subscribers)**3)
|
||||
subscriber_bonus = 8 * 60 / max(.167, max(0, self.active_subscribers)**3)
|
||||
if self.premium_subscribers > 0:
|
||||
subscriber_bonus /= 6
|
||||
|
||||
|
|
|
@ -10,4 +10,4 @@
|
|||
199.15.250.229 task01 task01.newsblur.com
|
||||
199.15.250.230 task02 task02.newsblur.com
|
||||
199.15.250.231 task03 task03.newsblur.com
|
||||
199.15.250.232 task04 task04.newsblur.com
|
||||
199.15.250.250 task04 task04.newsblur.com
|
||||
|
|
|
@ -4,7 +4,7 @@ upstream app_server {
|
|||
|
||||
server {
|
||||
listen 80 default;
|
||||
client_max_body_size 1M;
|
||||
client_max_body_size 4M;
|
||||
server_name _;
|
||||
|
||||
location /media/admin/ {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
worker_processes 1;
|
||||
user nginx nginx;
|
||||
pid /usr/local/nginx/logs/nginx.pid;
|
||||
error_log /usr/local/nginx/logs/error.log;
|
||||
worker_processes 4;
|
||||
user nginx nginx;
|
||||
|
||||
pid /usr/local/nginx/logs/nginx.pid;
|
||||
error_log /usr/local/nginx/logs/error.log;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
accept_mutex off;
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
|
@ -13,15 +13,18 @@ http {
|
|||
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
sendfile on;
|
||||
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
keepalive_timeout 2;
|
||||
client_max_body_size 4M;
|
||||
|
||||
gzip on;
|
||||
gzip_static on;
|
||||
gzip_comp_level 2;
|
||||
gzip_min_length 1000;
|
||||
gzip_proxied expired no-cache no-store private auth;
|
||||
gzip_types text/plain text/html application/xml text/css application/x-javascript application/javascript text/javascript application/xml application/xml+rss;
|
||||
gzip_vary on;
|
||||
gzip_proxied any;
|
||||
gzip_vary on;
|
||||
gzip_types text/plain text/css application/x-javascript application/json text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
include /usr/local/nginx/conf/sites-enabled/*;
|
||||
}
|
||||
|
|
2
fabfile.py
vendored
2
fabfile.py
vendored
|
@ -233,7 +233,7 @@ def setup_logrotate():
|
|||
put('config/logrotate.conf', '/etc/logrotate.d/newsblur', use_sudo=True)
|
||||
|
||||
def setup_sudoers():
|
||||
sudo('su - root -c "echo \"sclay ALL=(ALL) NOPASSWD: ALL\" >> /etc/sudoers"')
|
||||
sudo('su - root -c "echo \\\\"sclay ALL=(ALL) NOPASSWD: ALL\\\\" >> /etc/sudoers"')
|
||||
|
||||
# ===============
|
||||
# = Setup - App =
|
||||
|
|
Loading…
Add table
Reference in a new issue