Skip to content

Commit

Permalink
Docstrings updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
idlesign committed Oct 17, 2017
1 parent b34bb77 commit d313b12
Showing 1 changed file with 8 additions and 17 deletions.
25 changes: 8 additions & 17 deletions uwsgiconf/options/workers_cheapening.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def __init__(self, *args, **kwargs):
class AlgoSpare(Algo):
"""The **default** algorithm.
If all workers are busy for ``cheaper_overload`` seconds then uWSGI will spawn new workers.
If all workers are busy for a certain amount of time seconds then uWSGI will spawn new workers.
When the load is gone it will begin stopping processes one at a time.
* http://uwsgi.readthedocs.io/en/latest/Cheaper.html#spare-cheaper-algorithm
Expand All @@ -20,11 +20,9 @@ class AlgoSpare(Algo):
name = 'spare'

def set_basic_params(self, check_interval_overload=None):
"""Sets ``spare`` cheaper algorithm params.
* http://uwsgi.readthedocs.io/en/latest/Cheaper.html#spare-cheaper-algorithm
:param int check_interval_overload: Interval (sec) to for worker overload.
"""
:param int check_interval_overload: Interval (sec) to wait after all workers are busy
before new worker spawn.
"""
self._set('cheaper-overload', check_interval_overload)
Expand All @@ -34,7 +32,7 @@ def set_basic_params(self, check_interval_overload=None):

class AlgoSpare2(Algo):
"""This algorithm is similar to ``spare``, but suitable for large scale
by increase workers faster and decrease workers slower.
by increase workers faster (before overload) and decrease them slower.
* http://uwsgi.readthedocs.io/en/latest/Cheaper.html#spare2-cheaper-algorithm
Expand All @@ -43,10 +41,7 @@ class AlgoSpare2(Algo):
name = 'spare2'

def set_basic_params(self, check_interval_idle=None):
"""Sets ``spare2`` cheaper algorithm params.
* http://uwsgi.readthedocs.io/en/latest/Cheaper.html#spare2-cheaper-algorithm
"""
:param int check_interval_idle: Decrease workers after specified idle. Default: 10.
"""
Expand All @@ -69,10 +64,7 @@ class AlgoBacklog(Algo):
name = 'backlog'

def set_basic_params(self, check_num_overload=None):
"""Sets ``backlog`` cheaper algorithm params.
* http://uwsgi.readthedocs.io/en/latest/Cheaper.html#backlog-cheaper-algorithm
"""
:param int check_num_overload: Number of backlog items in queue.
"""
Expand Down Expand Up @@ -100,8 +92,7 @@ def set_basic_params(
busy_max=None, busy_min=None,
idle_cycles_max=None, idle_cycles_penalty=None,
verbose=None):
"""Sets busyness algorithm related params.
"""
:param int check_interval_busy: Interval (sec) to check worker busyness.
:param int busy_max: Maximum busyness (percents). Every time the calculated busyness
Expand Down

0 comments on commit d313b12

Please sign in to comment.