Skip to content

Commit

Permalink
set_harakiri_params() improved
Browse files Browse the repository at this point in the history
  • Loading branch information
idlesign committed Oct 23, 2017
1 parent db67208 commit b104081
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions uwsgiconf/options/workers.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,22 +340,22 @@ def set_reload_on_exception_params(self, do_reload=None, etype=None, evalue=None
def set_harakiri_params(self, timeout=None, verbose=None, disable_for_arh=None):
"""Sets workers harakiri parameters.
:param timeout: Harakiri timeout in seconds.
:param int timeout: Harakiri timeout in seconds.
Every request that will take longer than the seconds specified
in the harakiri timeout will be dropped and the corresponding
worker is thereafter recycled.
:param verbose: Harakiri verbose mode.
:param bool verbose: Harakiri verbose mode.
When a request is killed by Harakiri you will get a message in the uWSGI log.
Enabling this option will print additional info (for example,
the current syscall will be reported on Linux platforms).
:param disable_for_arh: Disallow Harakiri killings during after-request hook methods.
:param bool disable_for_arh: Disallow Harakiri killings during after-request hook methods.
"""
self._set('harakiri', timeout)
self._set('harakiri-verbose', verbose)
self._set('harakiri-no-arh', disable_for_arh)
self._set('harakiri-verbose', verbose, cast=bool)
self._set('harakiri-no-arh', disable_for_arh, cast=bool)

return self._section

Expand Down

0 comments on commit b104081

Please sign in to comment.