repository_name stringlengths 7 55 | func_path_in_repository stringlengths 4 223 | func_name stringlengths 1 134 | whole_func_string stringlengths 75 104k | language stringclasses 1
value | func_code_string stringlengths 75 104k | func_code_tokens listlengths 19 28.4k | func_documentation_string stringlengths 1 46.9k | func_documentation_tokens listlengths 1 1.97k | split_name stringclasses 1
value | func_code_url stringlengths 87 315 |
|---|---|---|---|---|---|---|---|---|---|---|
idlesign/uwsgiconf | uwsgiconf/options/master_process.py | MasterProcess.set_idle_params | def set_idle_params(self, timeout=None, exit=None):
"""Activate idle mode - put uWSGI in cheap mode after inactivity timeout.
:param int timeout: Inactivity timeout in seconds.
:param bool exit: Shutdown uWSGI when idle.
"""
self._set('idle', timeout)
self._set('die-on... | python | def set_idle_params(self, timeout=None, exit=None):
"""Activate idle mode - put uWSGI in cheap mode after inactivity timeout.
:param int timeout: Inactivity timeout in seconds.
:param bool exit: Shutdown uWSGI when idle.
"""
self._set('idle', timeout)
self._set('die-on... | [
"def",
"set_idle_params",
"(",
"self",
",",
"timeout",
"=",
"None",
",",
"exit",
"=",
"None",
")",
":",
"self",
".",
"_set",
"(",
"'idle'",
",",
"timeout",
")",
"self",
".",
"_set",
"(",
"'die-on-idle'",
",",
"exit",
",",
"cast",
"=",
"bool",
")",
... | Activate idle mode - put uWSGI in cheap mode after inactivity timeout.
:param int timeout: Inactivity timeout in seconds.
:param bool exit: Shutdown uWSGI when idle. | [
"Activate",
"idle",
"mode",
"-",
"put",
"uWSGI",
"in",
"cheap",
"mode",
"after",
"inactivity",
"timeout",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/master_process.py#L102-L113 |
idlesign/uwsgiconf | uwsgiconf/options/master_process.py | MasterProcess.set_reload_params | def set_reload_params(self, mercy=None, exit=None):
"""Set reload related params.
:param int mercy: Set the maximum time (in seconds) we wait
for workers and other processes to die during reload/shutdown.
:param bool exit: Force exit even if a reload is requested.
"""
... | python | def set_reload_params(self, mercy=None, exit=None):
"""Set reload related params.
:param int mercy: Set the maximum time (in seconds) we wait
for workers and other processes to die during reload/shutdown.
:param bool exit: Force exit even if a reload is requested.
"""
... | [
"def",
"set_reload_params",
"(",
"self",
",",
"mercy",
"=",
"None",
",",
"exit",
"=",
"None",
")",
":",
"self",
".",
"_set",
"(",
"'reload-mercy'",
",",
"mercy",
")",
"self",
".",
"set_exit_events",
"(",
"reload",
"=",
"exit",
")",
"return",
"self",
".... | Set reload related params.
:param int mercy: Set the maximum time (in seconds) we wait
for workers and other processes to die during reload/shutdown.
:param bool exit: Force exit even if a reload is requested. | [
"Set",
"reload",
"related",
"params",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/master_process.py#L115-L127 |
idlesign/uwsgiconf | uwsgiconf/options/master_process.py | MasterProcess.add_cron_task | def add_cron_task(
self, command, weekday=None, month=None, day=None, hour=None, minute=None,
legion=None, unique=None, harakiri=None):
"""Adds a cron task running the given command on the given schedule.
http://uwsgi.readthedocs.io/en/latest/Cron.html
HINTS:
... | python | def add_cron_task(
self, command, weekday=None, month=None, day=None, hour=None, minute=None,
legion=None, unique=None, harakiri=None):
"""Adds a cron task running the given command on the given schedule.
http://uwsgi.readthedocs.io/en/latest/Cron.html
HINTS:
... | [
"def",
"add_cron_task",
"(",
"self",
",",
"command",
",",
"weekday",
"=",
"None",
",",
"month",
"=",
"None",
",",
"day",
"=",
"None",
",",
"hour",
"=",
"None",
",",
"minute",
"=",
"None",
",",
"legion",
"=",
"None",
",",
"unique",
"=",
"None",
",",... | Adds a cron task running the given command on the given schedule.
http://uwsgi.readthedocs.io/en/latest/Cron.html
HINTS:
* Use negative values to say `every`:
hour=-3 stands for `every 3 hours`
* Use - (minus) to make interval:
minute='13-18' s... | [
"Adds",
"a",
"cron",
"task",
"running",
"the",
"given",
"command",
"on",
"the",
"given",
"schedule",
".",
"http",
":",
"//",
"uwsgi",
".",
"readthedocs",
".",
"io",
"/",
"en",
"/",
"latest",
"/",
"Cron",
".",
"html"
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/master_process.py#L129-L179 |
idlesign/uwsgiconf | uwsgiconf/options/master_process.py | MasterProcess.attach_process_classic | def attach_process_classic(self, command_or_pid_path, background, control=False, for_legion=False):
"""Attaches a command/daemon to the master process optionally managed by a pidfile.
This will allow the uWSGI master to control/monitor/respawn this process.
.. note:: This uses old classic uWSG... | python | def attach_process_classic(self, command_or_pid_path, background, control=False, for_legion=False):
"""Attaches a command/daemon to the master process optionally managed by a pidfile.
This will allow the uWSGI master to control/monitor/respawn this process.
.. note:: This uses old classic uWSG... | [
"def",
"attach_process_classic",
"(",
"self",
",",
"command_or_pid_path",
",",
"background",
",",
"control",
"=",
"False",
",",
"for_legion",
"=",
"False",
")",
":",
"prefix",
"=",
"'legion-'",
"if",
"for_legion",
"else",
"''",
"if",
"'.pid'",
"in",
"command_o... | Attaches a command/daemon to the master process optionally managed by a pidfile.
This will allow the uWSGI master to control/monitor/respawn this process.
.. note:: This uses old classic uWSGI means of process attaching
To have more control use ``.attach_process()`` method (requires uWSGI... | [
"Attaches",
"a",
"command",
"/",
"daemon",
"to",
"the",
"master",
"process",
"optionally",
"managed",
"by",
"a",
"pidfile",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/master_process.py#L181-L230 |
idlesign/uwsgiconf | uwsgiconf/options/master_process.py | MasterProcess.attach_process | def attach_process(
self, command, for_legion=False, broken_counter=None, pidfile=None, control=None, daemonize=None,
touch_reload=None, signal_stop=None, signal_reload=None, honour_stdin=None,
uid=None, gid=None, new_pid_ns=None, change_dir=None):
"""Attaches a command/daemo... | python | def attach_process(
self, command, for_legion=False, broken_counter=None, pidfile=None, control=None, daemonize=None,
touch_reload=None, signal_stop=None, signal_reload=None, honour_stdin=None,
uid=None, gid=None, new_pid_ns=None, change_dir=None):
"""Attaches a command/daemo... | [
"def",
"attach_process",
"(",
"self",
",",
"command",
",",
"for_legion",
"=",
"False",
",",
"broken_counter",
"=",
"None",
",",
"pidfile",
"=",
"None",
",",
"control",
"=",
"None",
",",
"daemonize",
"=",
"None",
",",
"touch_reload",
"=",
"None",
",",
"si... | Attaches a command/daemon to the master process.
This will allow the uWSGI master to control/monitor/respawn this process.
http://uwsgi-docs.readthedocs.io/en/latest/AttachingDaemons.html
:param str|unicode command: The command line to execute.
:param bool for_legion: Legion daemons ... | [
"Attaches",
"a",
"command",
"/",
"daemon",
"to",
"the",
"master",
"process",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/master_process.py#L232-L309 |
idlesign/uwsgiconf | uwsgiconf/options/workers_cheapening.py | AlgoBusyness.set_basic_params | def set_basic_params(
self, check_interval_busy=None,
busy_max=None, busy_min=None,
idle_cycles_max=None, idle_cycles_penalty=None,
verbose=None):
"""
:param int check_interval_busy: Interval (sec) to check worker busyness.
:param int busy_max: Ma... | python | def set_basic_params(
self, check_interval_busy=None,
busy_max=None, busy_min=None,
idle_cycles_max=None, idle_cycles_penalty=None,
verbose=None):
"""
:param int check_interval_busy: Interval (sec) to check worker busyness.
:param int busy_max: Ma... | [
"def",
"set_basic_params",
"(",
"self",
",",
"check_interval_busy",
"=",
"None",
",",
"busy_max",
"=",
"None",
",",
"busy_min",
"=",
"None",
",",
"idle_cycles_max",
"=",
"None",
",",
"idle_cycles_penalty",
"=",
"None",
",",
"verbose",
"=",
"None",
")",
":",
... | :param int check_interval_busy: Interval (sec) to check worker busyness.
:param int busy_max: Maximum busyness (percents). Every time the calculated busyness
is higher than this value, uWSGI will spawn new workers. Default: 50.
:param int busy_min: Minimum busyness (percents). If busyness ... | [
":",
"param",
"int",
"check_interval_busy",
":",
"Interval",
"(",
"sec",
")",
"to",
"check",
"worker",
"busyness",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/workers_cheapening.py#L90-L121 |
idlesign/uwsgiconf | uwsgiconf/options/workers_cheapening.py | AlgoBusyness.set_emergency_params | def set_emergency_params(
self, workers_step=None, idle_cycles_max=None, queue_size=None, queue_nonzero_delay=None):
"""Sets busyness algorithm emergency workers related params.
Emergency workers could be spawned depending upon uWSGI backlog state.
.. note:: These options are Linux... | python | def set_emergency_params(
self, workers_step=None, idle_cycles_max=None, queue_size=None, queue_nonzero_delay=None):
"""Sets busyness algorithm emergency workers related params.
Emergency workers could be spawned depending upon uWSGI backlog state.
.. note:: These options are Linux... | [
"def",
"set_emergency_params",
"(",
"self",
",",
"workers_step",
"=",
"None",
",",
"idle_cycles_max",
"=",
"None",
",",
"queue_size",
"=",
"None",
",",
"queue_nonzero_delay",
"=",
"None",
")",
":",
"self",
".",
"_set",
"(",
"'cheaper-busyness-backlog-step'",
","... | Sets busyness algorithm emergency workers related params.
Emergency workers could be spawned depending upon uWSGI backlog state.
.. note:: These options are Linux only.
:param int workers_step: Number of emergency workers to spawn. Default: 1.
:param int idle_cycles_max: Idle cycles ... | [
"Sets",
"busyness",
"algorithm",
"emergency",
"workers",
"related",
"params",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/workers_cheapening.py#L123-L146 |
idlesign/uwsgiconf | uwsgiconf/options/workers_cheapening.py | Cheapening.set_basic_params | def set_basic_params(
self, spawn_on_request=None,
cheaper_algo=None, workers_min=None, workers_startup=None, workers_step=None):
"""
:param bool spawn_on_request: Spawn workers only after the first request.
:param Algo cheaper_algo: The algorithm object to be used used ... | python | def set_basic_params(
self, spawn_on_request=None,
cheaper_algo=None, workers_min=None, workers_startup=None, workers_step=None):
"""
:param bool spawn_on_request: Spawn workers only after the first request.
:param Algo cheaper_algo: The algorithm object to be used used ... | [
"def",
"set_basic_params",
"(",
"self",
",",
"spawn_on_request",
"=",
"None",
",",
"cheaper_algo",
"=",
"None",
",",
"workers_min",
"=",
"None",
",",
"workers_startup",
"=",
"None",
",",
"workers_step",
"=",
"None",
")",
":",
"self",
".",
"_set",
"(",
"'ch... | :param bool spawn_on_request: Spawn workers only after the first request.
:param Algo cheaper_algo: The algorithm object to be used used for adaptive process spawning.
Default: ``spare``. See ``.algorithms``.
:param int workers_min: Minimal workers count. Enables cheaper mode (adaptive pro... | [
":",
"param",
"bool",
"spawn_on_request",
":",
"Spawn",
"workers",
"only",
"after",
"the",
"first",
"request",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/workers_cheapening.py#L175-L208 |
idlesign/uwsgiconf | uwsgiconf/options/workers_cheapening.py | Cheapening.set_memory_limits | def set_memory_limits(self, rss_soft=None, rss_hard=None):
"""Sets worker memory limits for cheapening.
:param int rss_soft: Don't spawn new workers if total resident memory usage
of all workers is higher than this limit in bytes.
.. warning:: This option expects me... | python | def set_memory_limits(self, rss_soft=None, rss_hard=None):
"""Sets worker memory limits for cheapening.
:param int rss_soft: Don't spawn new workers if total resident memory usage
of all workers is higher than this limit in bytes.
.. warning:: This option expects me... | [
"def",
"set_memory_limits",
"(",
"self",
",",
"rss_soft",
"=",
"None",
",",
"rss_hard",
"=",
"None",
")",
":",
"self",
".",
"_set",
"(",
"'cheaper-rss-limit-soft'",
",",
"rss_soft",
")",
"self",
".",
"_set",
"(",
"'cheaper-rss-limit-hard'",
",",
"rss_hard",
... | Sets worker memory limits for cheapening.
:param int rss_soft: Don't spawn new workers if total resident memory usage
of all workers is higher than this limit in bytes.
.. warning:: This option expects memory reporting enabled:
``.logging.set_basic_params(me... | [
"Sets",
"worker",
"memory",
"limits",
"for",
"cheapening",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/workers_cheapening.py#L210-L226 |
idlesign/uwsgiconf | uwsgiconf/runtime/environ.py | _Environment.get_version | def get_version(self, as_tuple=False):
"""Returns uWSGI version string or tuple.
:param bool as_tuple:
:rtype: str|tuple
"""
if as_tuple:
return uwsgi.version_info
return decode(uwsgi.version) | python | def get_version(self, as_tuple=False):
"""Returns uWSGI version string or tuple.
:param bool as_tuple:
:rtype: str|tuple
"""
if as_tuple:
return uwsgi.version_info
return decode(uwsgi.version) | [
"def",
"get_version",
"(",
"self",
",",
"as_tuple",
"=",
"False",
")",
":",
"if",
"as_tuple",
":",
"return",
"uwsgi",
".",
"version_info",
"return",
"decode",
"(",
"uwsgi",
".",
"version",
")"
] | Returns uWSGI version string or tuple.
:param bool as_tuple:
:rtype: str|tuple | [
"Returns",
"uWSGI",
"version",
"string",
"or",
"tuple",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/runtime/environ.py#L81-L91 |
idlesign/uwsgiconf | uwsgiconf/options/routing.py | Routing.register_route | def register_route(self, route_rules, label=None):
"""Registers a routing rule.
:param RouteRule|list[RouteRule] route_rules:
:param str|unicode label: Label to mark the given set of rules.
This can be used in conjunction with ``do_goto`` rule action.
* http://uwsgi.re... | python | def register_route(self, route_rules, label=None):
"""Registers a routing rule.
:param RouteRule|list[RouteRule] route_rules:
:param str|unicode label: Label to mark the given set of rules.
This can be used in conjunction with ``do_goto`` rule action.
* http://uwsgi.re... | [
"def",
"register_route",
"(",
"self",
",",
"route_rules",
",",
"label",
"=",
"None",
")",
":",
"route_rules",
"=",
"listify",
"(",
"route_rules",
")",
"if",
"route_rules",
"and",
"label",
":",
"self",
".",
"_set",
"(",
"route_rules",
"[",
"0",
"]",
".",
... | Registers a routing rule.
:param RouteRule|list[RouteRule] route_rules:
:param str|unicode label: Label to mark the given set of rules.
This can be used in conjunction with ``do_goto`` rule action.
* http://uwsgi.readthedocs.io/en/latest/InternalRouting.html#goto | [
"Registers",
"a",
"routing",
"rule",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/routing.py#L283-L302 |
idlesign/uwsgiconf | uwsgiconf/options/routing.py | Routing.set_error_page | def set_error_page(self, status, html_fpath):
"""Add an error page (html) for managed 403, 404, 500 response.
:param int status: HTTP status code.
:param str|unicode html_fpath: HTML page file path.
"""
statuses = [403, 404, 500]
status = int(status)
if statu... | python | def set_error_page(self, status, html_fpath):
"""Add an error page (html) for managed 403, 404, 500 response.
:param int status: HTTP status code.
:param str|unicode html_fpath: HTML page file path.
"""
statuses = [403, 404, 500]
status = int(status)
if statu... | [
"def",
"set_error_page",
"(",
"self",
",",
"status",
",",
"html_fpath",
")",
":",
"statuses",
"=",
"[",
"403",
",",
"404",
",",
"500",
"]",
"status",
"=",
"int",
"(",
"status",
")",
"if",
"status",
"not",
"in",
"statuses",
":",
"raise",
"ConfigurationE... | Add an error page (html) for managed 403, 404, 500 response.
:param int status: HTTP status code.
:param str|unicode html_fpath: HTML page file path. | [
"Add",
"an",
"error",
"page",
"(",
"html",
")",
"for",
"managed",
"403",
"404",
"500",
"response",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/routing.py#L311-L330 |
idlesign/uwsgiconf | uwsgiconf/options/routing.py | Routing.set_error_pages | def set_error_pages(self, codes_map=None, common_prefix=None):
"""Add an error pages for managed 403, 404, 500 responses.
Shortcut for ``.set_error_page()``.
:param dict codes_map: Status code mapped into an html filepath or
just a filename if common_prefix is used.
If... | python | def set_error_pages(self, codes_map=None, common_prefix=None):
"""Add an error pages for managed 403, 404, 500 responses.
Shortcut for ``.set_error_page()``.
:param dict codes_map: Status code mapped into an html filepath or
just a filename if common_prefix is used.
If... | [
"def",
"set_error_pages",
"(",
"self",
",",
"codes_map",
"=",
"None",
",",
"common_prefix",
"=",
"None",
")",
":",
"statuses",
"=",
"[",
"403",
",",
"404",
",",
"500",
"]",
"if",
"common_prefix",
":",
"if",
"not",
"codes_map",
":",
"codes_map",
"=",
"{... | Add an error pages for managed 403, 404, 500 responses.
Shortcut for ``.set_error_page()``.
:param dict codes_map: Status code mapped into an html filepath or
just a filename if common_prefix is used.
If not set, filename containing status code is presumed: 400.html, 500.html,... | [
"Add",
"an",
"error",
"pages",
"for",
"managed",
"403",
"404",
"500",
"responses",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/routing.py#L332-L357 |
idlesign/uwsgiconf | uwsgiconf/options/routing.py | Routing.set_geoip_params | def set_geoip_params(self, db_country=None, db_city=None):
"""Sets GeoIP parameters.
* http://uwsgi.readthedocs.io/en/latest/GeoIP.html
:param str|unicode db_country: Country database file path.
:param str|unicode db_city: City database file path. Example: ``GeoLiteCity.dat``.
... | python | def set_geoip_params(self, db_country=None, db_city=None):
"""Sets GeoIP parameters.
* http://uwsgi.readthedocs.io/en/latest/GeoIP.html
:param str|unicode db_country: Country database file path.
:param str|unicode db_city: City database file path. Example: ``GeoLiteCity.dat``.
... | [
"def",
"set_geoip_params",
"(",
"self",
",",
"db_country",
"=",
"None",
",",
"db_city",
"=",
"None",
")",
":",
"self",
".",
"_set",
"(",
"'geoip-country'",
",",
"db_country",
",",
"plugin",
"=",
"'geoip'",
")",
"self",
".",
"_set",
"(",
"'geoip-city'",
"... | Sets GeoIP parameters.
* http://uwsgi.readthedocs.io/en/latest/GeoIP.html
:param str|unicode db_country: Country database file path.
:param str|unicode db_city: City database file path. Example: ``GeoLiteCity.dat``. | [
"Sets",
"GeoIP",
"parameters",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/routing.py#L359-L372 |
idlesign/uwsgiconf | uwsgiconf/options/routing.py | Routing.header_add | def header_add(self, name, value):
"""Automatically add HTTP headers to response.
:param str|unicode name:
:param str|unicode value:
"""
self._set('add-header', '%s: %s' % (name, value), multi=True)
return self._section | python | def header_add(self, name, value):
"""Automatically add HTTP headers to response.
:param str|unicode name:
:param str|unicode value:
"""
self._set('add-header', '%s: %s' % (name, value), multi=True)
return self._section | [
"def",
"header_add",
"(",
"self",
",",
"name",
",",
"value",
")",
":",
"self",
".",
"_set",
"(",
"'add-header'",
",",
"'%s: %s'",
"%",
"(",
"name",
",",
"value",
")",
",",
"multi",
"=",
"True",
")",
"return",
"self",
".",
"_section"
] | Automatically add HTTP headers to response.
:param str|unicode name:
:param str|unicode value: | [
"Automatically",
"add",
"HTTP",
"headers",
"to",
"response",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/routing.py#L374-L384 |
idlesign/uwsgiconf | uwsgiconf/options/routing.py | Routing.header_remove | def header_remove(self, value):
"""Automatically remove specified HTTP header from the response.
:param str|unicode value:
"""
self._set('del-header', value, multi=True)
return self._section | python | def header_remove(self, value):
"""Automatically remove specified HTTP header from the response.
:param str|unicode value:
"""
self._set('del-header', value, multi=True)
return self._section | [
"def",
"header_remove",
"(",
"self",
",",
"value",
")",
":",
"self",
".",
"_set",
"(",
"'del-header'",
",",
"value",
",",
"multi",
"=",
"True",
")",
"return",
"self",
".",
"_section"
] | Automatically remove specified HTTP header from the response.
:param str|unicode value: | [
"Automatically",
"remove",
"specified",
"HTTP",
"header",
"from",
"the",
"response",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/routing.py#L386-L394 |
idlesign/uwsgiconf | uwsgiconf/options/routing.py | Routing.header_collect | def header_collect(self, name, target_var, pull=False):
"""Store the specified response header in a request var
(optionally removing it from the response).
:param str|unicode name:
:param str|unicode target_var:
:param bool pull: Whether to remove header from response.
... | python | def header_collect(self, name, target_var, pull=False):
"""Store the specified response header in a request var
(optionally removing it from the response).
:param str|unicode name:
:param str|unicode target_var:
:param bool pull: Whether to remove header from response.
... | [
"def",
"header_collect",
"(",
"self",
",",
"name",
",",
"target_var",
",",
"pull",
"=",
"False",
")",
":",
"self",
".",
"_set",
"(",
"'pull-header'",
"if",
"pull",
"else",
"'collect-header'",
",",
"'%s %s'",
"%",
"(",
"name",
",",
"target_var",
")",
",",... | Store the specified response header in a request var
(optionally removing it from the response).
:param str|unicode name:
:param str|unicode target_var:
:param bool pull: Whether to remove header from response. | [
"Store",
"the",
"specified",
"response",
"header",
"in",
"a",
"request",
"var",
"(",
"optionally",
"removing",
"it",
"from",
"the",
"response",
")",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/routing.py#L396-L411 |
idlesign/uwsgiconf | uwsgiconf/options/statics.py | Statics.register_static_map | def register_static_map(self, mountpoint, target, retain_resource_path=False, safe_target=False):
"""Allows mapping mountpoint to a static directory (or file).
* http://uwsgi.readthedocs.io/en/latest/StaticFiles.html#mode-3-using-static-file-mount-points
:param str|unicode mountpoint:
... | python | def register_static_map(self, mountpoint, target, retain_resource_path=False, safe_target=False):
"""Allows mapping mountpoint to a static directory (or file).
* http://uwsgi.readthedocs.io/en/latest/StaticFiles.html#mode-3-using-static-file-mount-points
:param str|unicode mountpoint:
... | [
"def",
"register_static_map",
"(",
"self",
",",
"mountpoint",
",",
"target",
",",
"retain_resource_path",
"=",
"False",
",",
"safe_target",
"=",
"False",
")",
":",
"command",
"=",
"'static-map'",
"if",
"retain_resource_path",
":",
"command",
"+=",
"'2'",
"self",... | Allows mapping mountpoint to a static directory (or file).
* http://uwsgi.readthedocs.io/en/latest/StaticFiles.html#mode-3-using-static-file-mount-points
:param str|unicode mountpoint:
:param str|unicode target:
:param bool retain_resource_path: Append the requested resource to the d... | [
"Allows",
"mapping",
"mountpoint",
"to",
"a",
"static",
"directory",
"(",
"or",
"file",
")",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/statics.py#L92-L127 |
idlesign/uwsgiconf | uwsgiconf/options/statics.py | Statics.add_expiration_rule | def add_expiration_rule(self, criterion, value, timeout, use_mod_time=False):
"""Adds statics expiration rule based on a criterion.
:param str|unicode criterion: Criterion (subject) to base expiration on.
See ``.expiration_criteria``.
:param str|unicode|list[str|unicode] value: Va... | python | def add_expiration_rule(self, criterion, value, timeout, use_mod_time=False):
"""Adds statics expiration rule based on a criterion.
:param str|unicode criterion: Criterion (subject) to base expiration on.
See ``.expiration_criteria``.
:param str|unicode|list[str|unicode] value: Va... | [
"def",
"add_expiration_rule",
"(",
"self",
",",
"criterion",
",",
"value",
",",
"timeout",
",",
"use_mod_time",
"=",
"False",
")",
":",
"command",
"=",
"'static-expires'",
"separator",
"=",
"' '",
"if",
"criterion",
"!=",
"self",
".",
"expiration_criteria",
".... | Adds statics expiration rule based on a criterion.
:param str|unicode criterion: Criterion (subject) to base expiration on.
See ``.expiration_criteria``.
:param str|unicode|list[str|unicode] value: Value to test criteria upon.
.. note:: Usually a regular expression.
... | [
"Adds",
"statics",
"expiration",
"rule",
"based",
"on",
"a",
"criterion",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/statics.py#L129-L163 |
idlesign/uwsgiconf | uwsgiconf/options/statics.py | Statics.set_paths_caching_params | def set_paths_caching_params(self, timeout=None, cache_name=None):
"""Use the uWSGI caching subsystem to store mappings from URI to filesystem paths.
* http://uwsgi.readthedocs.io/en/latest/StaticFiles.html#caching-paths-mappings-resolutions
:param int timeout: Amount of seconds to put resolve... | python | def set_paths_caching_params(self, timeout=None, cache_name=None):
"""Use the uWSGI caching subsystem to store mappings from URI to filesystem paths.
* http://uwsgi.readthedocs.io/en/latest/StaticFiles.html#caching-paths-mappings-resolutions
:param int timeout: Amount of seconds to put resolve... | [
"def",
"set_paths_caching_params",
"(",
"self",
",",
"timeout",
"=",
"None",
",",
"cache_name",
"=",
"None",
")",
":",
"self",
".",
"_set",
"(",
"'static-cache-paths'",
",",
"timeout",
")",
"self",
".",
"_set",
"(",
"'static-cache-paths-name'",
",",
"cache_nam... | Use the uWSGI caching subsystem to store mappings from URI to filesystem paths.
* http://uwsgi.readthedocs.io/en/latest/StaticFiles.html#caching-paths-mappings-resolutions
:param int timeout: Amount of seconds to put resolved paths in the uWSGI cache.
:param str|unicode cache_name: Cache name... | [
"Use",
"the",
"uWSGI",
"caching",
"subsystem",
"to",
"store",
"mappings",
"from",
"URI",
"to",
"filesystem",
"paths",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/statics.py#L168-L181 |
idlesign/uwsgiconf | uwsgiconf/options/networking.py | Networking.set_socket_params | def set_socket_params(
self, send_timeout=None, keep_alive=None, no_defer_accept=None,
buffer_send=None, buffer_receive=None):
"""Sets common socket params.
:param int send_timeout: Send (write) timeout in seconds.
:param bool keep_alive: Enable TCP KEEPALIVEs.
... | python | def set_socket_params(
self, send_timeout=None, keep_alive=None, no_defer_accept=None,
buffer_send=None, buffer_receive=None):
"""Sets common socket params.
:param int send_timeout: Send (write) timeout in seconds.
:param bool keep_alive: Enable TCP KEEPALIVEs.
... | [
"def",
"set_socket_params",
"(",
"self",
",",
"send_timeout",
"=",
"None",
",",
"keep_alive",
"=",
"None",
",",
"no_defer_accept",
"=",
"None",
",",
"buffer_send",
"=",
"None",
",",
"buffer_receive",
"=",
"None",
")",
":",
"self",
".",
"_set",
"(",
"'so-se... | Sets common socket params.
:param int send_timeout: Send (write) timeout in seconds.
:param bool keep_alive: Enable TCP KEEPALIVEs.
:param bool no_defer_accept: Disable deferred ``accept()`` on sockets
by default (where available) uWSGI will defer the accept() of requests until so... | [
"Sets",
"common",
"socket",
"params",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/networking.py#L56-L81 |
idlesign/uwsgiconf | uwsgiconf/options/networking.py | Networking.set_unix_socket_params | def set_unix_socket_params(self, abstract=None, permissions=None, owner=None, umask=None):
"""Sets Unix-socket related params.
:param bool abstract: Force UNIX socket into abstract mode (Linux only).
:param str permissions: UNIX sockets are filesystem objects that obey
UNIX permiss... | python | def set_unix_socket_params(self, abstract=None, permissions=None, owner=None, umask=None):
"""Sets Unix-socket related params.
:param bool abstract: Force UNIX socket into abstract mode (Linux only).
:param str permissions: UNIX sockets are filesystem objects that obey
UNIX permiss... | [
"def",
"set_unix_socket_params",
"(",
"self",
",",
"abstract",
"=",
"None",
",",
"permissions",
"=",
"None",
",",
"owner",
"=",
"None",
",",
"umask",
"=",
"None",
")",
":",
"self",
".",
"_set",
"(",
"'abstract-socket'",
",",
"abstract",
",",
"cast",
"=",... | Sets Unix-socket related params.
:param bool abstract: Force UNIX socket into abstract mode (Linux only).
:param str permissions: UNIX sockets are filesystem objects that obey
UNIX permissions like any other filesystem object.
You can set the UNIX sockets' permissions with thi... | [
"Sets",
"Unix",
"-",
"socket",
"related",
"params",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/networking.py#L83-L105 |
idlesign/uwsgiconf | uwsgiconf/options/networking.py | Networking.set_bsd_socket_params | def set_bsd_socket_params(self, port_reuse=None):
"""Sets BSD-sockets related params.
:param bool port_reuse: Enable REUSE_PORT flag on socket to allow multiple
instances binding on the same address (BSD only).
"""
self._set('reuse-port', port_reuse, cast=bool)
ret... | python | def set_bsd_socket_params(self, port_reuse=None):
"""Sets BSD-sockets related params.
:param bool port_reuse: Enable REUSE_PORT flag on socket to allow multiple
instances binding on the same address (BSD only).
"""
self._set('reuse-port', port_reuse, cast=bool)
ret... | [
"def",
"set_bsd_socket_params",
"(",
"self",
",",
"port_reuse",
"=",
"None",
")",
":",
"self",
".",
"_set",
"(",
"'reuse-port'",
",",
"port_reuse",
",",
"cast",
"=",
"bool",
")",
"return",
"self",
".",
"_section"
] | Sets BSD-sockets related params.
:param bool port_reuse: Enable REUSE_PORT flag on socket to allow multiple
instances binding on the same address (BSD only). | [
"Sets",
"BSD",
"-",
"sockets",
"related",
"params",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/networking.py#L107-L116 |
idlesign/uwsgiconf | uwsgiconf/options/networking.py | Networking.register_socket | def register_socket(self, socket):
"""Registers the given socket(s) for further use.
:param Socket|list[Socket] socket: Socket type object. See ``.sockets``.
"""
sockets = self._sockets
for socket in listify(socket):
uses_shared = isinstance(socket.address, Socket... | python | def register_socket(self, socket):
"""Registers the given socket(s) for further use.
:param Socket|list[Socket] socket: Socket type object. See ``.sockets``.
"""
sockets = self._sockets
for socket in listify(socket):
uses_shared = isinstance(socket.address, Socket... | [
"def",
"register_socket",
"(",
"self",
",",
"socket",
")",
":",
"sockets",
"=",
"self",
".",
"_sockets",
"for",
"socket",
"in",
"listify",
"(",
"socket",
")",
":",
"uses_shared",
"=",
"isinstance",
"(",
"socket",
".",
"address",
",",
"SocketShared",
")",
... | Registers the given socket(s) for further use.
:param Socket|list[Socket] socket: Socket type object. See ``.sockets``. | [
"Registers",
"the",
"given",
"socket",
"(",
"s",
")",
"for",
"further",
"use",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/networking.py#L121-L158 |
idlesign/uwsgiconf | uwsgiconf/options/networking.py | Networking.set_sni_params | def set_sni_params(self, name, cert, key, ciphers=None, client_ca=None, wildcard=False):
"""Allows setting Server Name Identification (virtual hosting for SSL nodes) params.
* http://uwsgi.readthedocs.io/en/latest/SNI.html
:param str|unicode name: Node/server/host name.
:param str|uni... | python | def set_sni_params(self, name, cert, key, ciphers=None, client_ca=None, wildcard=False):
"""Allows setting Server Name Identification (virtual hosting for SSL nodes) params.
* http://uwsgi.readthedocs.io/en/latest/SNI.html
:param str|unicode name: Node/server/host name.
:param str|uni... | [
"def",
"set_sni_params",
"(",
"self",
",",
"name",
",",
"cert",
",",
"key",
",",
"ciphers",
"=",
"None",
",",
"client_ca",
"=",
"None",
",",
"wildcard",
"=",
"False",
")",
":",
"command",
"=",
"'sni'",
"if",
"wildcard",
":",
"command",
"+=",
"'-regexp'... | Allows setting Server Name Identification (virtual hosting for SSL nodes) params.
* http://uwsgi.readthedocs.io/en/latest/SNI.html
:param str|unicode name: Node/server/host name.
:param str|unicode cert: Certificate file.
:param str|unicode key: Private key file.
:param str|... | [
"Allows",
"setting",
"Server",
"Name",
"Identification",
"(",
"virtual",
"hosting",
"for",
"SSL",
"nodes",
")",
"params",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/networking.py#L206-L243 |
idlesign/uwsgiconf | uwsgiconf/options/networking.py | Networking.set_sni_dir_params | def set_sni_dir_params(self, dir, ciphers=None):
"""Enable checking for cert/key/client_ca file in the specified directory
and create a sni/ssl context on demand.
Expected filenames:
* <sni-name>.crt
* <sni-name>.key
* <sni-name>.ca - this file is optional
... | python | def set_sni_dir_params(self, dir, ciphers=None):
"""Enable checking for cert/key/client_ca file in the specified directory
and create a sni/ssl context on demand.
Expected filenames:
* <sni-name>.crt
* <sni-name>.key
* <sni-name>.ca - this file is optional
... | [
"def",
"set_sni_dir_params",
"(",
"self",
",",
"dir",
",",
"ciphers",
"=",
"None",
")",
":",
"self",
".",
"_set",
"(",
"'sni-dir'",
",",
"dir",
")",
"self",
".",
"_set",
"(",
"'sni-dir-ciphers'",
",",
"ciphers",
")",
"return",
"self",
".",
"_section"
] | Enable checking for cert/key/client_ca file in the specified directory
and create a sni/ssl context on demand.
Expected filenames:
* <sni-name>.crt
* <sni-name>.key
* <sni-name>.ca - this file is optional
* http://uwsgi.readthedocs.io/en/latest/SNI.html#mass... | [
"Enable",
"checking",
"for",
"cert",
"/",
"key",
"/",
"client_ca",
"file",
"in",
"the",
"specified",
"directory",
"and",
"create",
"a",
"sni",
"/",
"ssl",
"context",
"on",
"demand",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/networking.py#L245-L271 |
idlesign/uwsgiconf | uwsgiconf/options/queue.py | Queue.enable | def enable(self, size, block_size=None, store=None, store_sync_interval=None):
"""Enables shared queue of the given size.
:param int size: Queue size.
:param int block_size: Block size in bytes. Default: 8 KiB.
:param str|unicode store: Persist the queue into file.
:param int... | python | def enable(self, size, block_size=None, store=None, store_sync_interval=None):
"""Enables shared queue of the given size.
:param int size: Queue size.
:param int block_size: Block size in bytes. Default: 8 KiB.
:param str|unicode store: Persist the queue into file.
:param int... | [
"def",
"enable",
"(",
"self",
",",
"size",
",",
"block_size",
"=",
"None",
",",
"store",
"=",
"None",
",",
"store_sync_interval",
"=",
"None",
")",
":",
"self",
".",
"_set",
"(",
"'queue'",
",",
"size",
")",
"self",
".",
"_set",
"(",
"'queue-blocksize'... | Enables shared queue of the given size.
:param int size: Queue size.
:param int block_size: Block size in bytes. Default: 8 KiB.
:param str|unicode store: Persist the queue into file.
:param int store_sync_interval: Store sync interval in master cycles (usually seconds). | [
"Enables",
"shared",
"queue",
"of",
"the",
"given",
"size",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/queue.py#L15-L32 |
idlesign/uwsgiconf | uwsgiconf/options/locks.py | Locks.set_basic_params | def set_basic_params(self, count=None, thunder_lock=None, lock_engine=None):
"""
:param int count: Create the specified number of shared locks.
:param bool thunder_lock: Serialize accept() usage (if possible)
Could improve performance on Linux with robust pthread mutexes.
... | python | def set_basic_params(self, count=None, thunder_lock=None, lock_engine=None):
"""
:param int count: Create the specified number of shared locks.
:param bool thunder_lock: Serialize accept() usage (if possible)
Could improve performance on Linux with robust pthread mutexes.
... | [
"def",
"set_basic_params",
"(",
"self",
",",
"count",
"=",
"None",
",",
"thunder_lock",
"=",
"None",
",",
"lock_engine",
"=",
"None",
")",
":",
"self",
".",
"_set",
"(",
"'thunder-lock'",
",",
"thunder_lock",
",",
"cast",
"=",
"bool",
")",
"self",
".",
... | :param int count: Create the specified number of shared locks.
:param bool thunder_lock: Serialize accept() usage (if possible)
Could improve performance on Linux with robust pthread mutexes.
http://uwsgi.readthedocs.io/en/latest/articles/SerializingAccept.html
:param str|unic... | [
":",
"param",
"int",
"count",
":",
"Create",
"the",
"specified",
"number",
"of",
"shared",
"locks",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/locks.py#L11-L30 |
idlesign/uwsgiconf | uwsgiconf/options/locks.py | Locks.set_ipcsem_params | def set_ipcsem_params(self, ftok=None, persistent=None):
"""Sets ipcsem lock engine params.
:param str|unicode ftok: Set the ipcsem key via ftok() for avoiding duplicates.
:param bool persistent: Do not remove ipcsem's on shutdown.
"""
self._set('ftok', ftok)
self._set... | python | def set_ipcsem_params(self, ftok=None, persistent=None):
"""Sets ipcsem lock engine params.
:param str|unicode ftok: Set the ipcsem key via ftok() for avoiding duplicates.
:param bool persistent: Do not remove ipcsem's on shutdown.
"""
self._set('ftok', ftok)
self._set... | [
"def",
"set_ipcsem_params",
"(",
"self",
",",
"ftok",
"=",
"None",
",",
"persistent",
"=",
"None",
")",
":",
"self",
".",
"_set",
"(",
"'ftok'",
",",
"ftok",
")",
"self",
".",
"_set",
"(",
"'persistent-ipcsem'",
",",
"persistent",
",",
"cast",
"=",
"bo... | Sets ipcsem lock engine params.
:param str|unicode ftok: Set the ipcsem key via ftok() for avoiding duplicates.
:param bool persistent: Do not remove ipcsem's on shutdown. | [
"Sets",
"ipcsem",
"lock",
"engine",
"params",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/locks.py#L32-L43 |
idlesign/uwsgiconf | uwsgiconf/options/locks.py | Locks.lock_file | def lock_file(self, fpath, after_setup=False, wait=False):
"""Locks the specified file.
:param str|unicode fpath: File path.
:param bool after_setup:
True - after logging/daemon setup
False - before starting
:param bool wait:
True - wait if locked... | python | def lock_file(self, fpath, after_setup=False, wait=False):
"""Locks the specified file.
:param str|unicode fpath: File path.
:param bool after_setup:
True - after logging/daemon setup
False - before starting
:param bool wait:
True - wait if locked... | [
"def",
"lock_file",
"(",
"self",
",",
"fpath",
",",
"after_setup",
"=",
"False",
",",
"wait",
"=",
"False",
")",
":",
"command",
"=",
"'flock-wait'",
"if",
"wait",
"else",
"'flock'",
"if",
"after_setup",
":",
"command",
"=",
"'%s2'",
"%",
"command",
"sel... | Locks the specified file.
:param str|unicode fpath: File path.
:param bool after_setup:
True - after logging/daemon setup
False - before starting
:param bool wait:
True - wait if locked
False - exit if locked | [
"Locks",
"the",
"specified",
"file",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/locks.py#L45-L66 |
idlesign/uwsgiconf | uwsgiconf/runtime/rpc.py | register_rpc | def register_rpc(name=None):
"""Decorator. Allows registering a function for RPC.
* http://uwsgi.readthedocs.io/en/latest/RPC.html
Example:
.. code-block:: python
@register_rpc()
def expose_me():
do()
:param str|unicode name: RPC function name to ass... | python | def register_rpc(name=None):
"""Decorator. Allows registering a function for RPC.
* http://uwsgi.readthedocs.io/en/latest/RPC.html
Example:
.. code-block:: python
@register_rpc()
def expose_me():
do()
:param str|unicode name: RPC function name to ass... | [
"def",
"register_rpc",
"(",
"name",
"=",
"None",
")",
":",
"def",
"wrapper",
"(",
"func",
")",
":",
"func_name",
"=",
"func",
".",
"__name__",
"rpc_name",
"=",
"name",
"or",
"func_name",
"uwsgi",
".",
"register_rpc",
"(",
"rpc_name",
",",
"func",
")",
... | Decorator. Allows registering a function for RPC.
* http://uwsgi.readthedocs.io/en/latest/RPC.html
Example:
.. code-block:: python
@register_rpc()
def expose_me():
do()
:param str|unicode name: RPC function name to associate
with decorated functi... | [
"Decorator",
".",
"Allows",
"registering",
"a",
"function",
"for",
"RPC",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/runtime/rpc.py#L7-L36 |
idlesign/uwsgiconf | uwsgiconf/runtime/rpc.py | make_rpc_call | def make_rpc_call(func_name, args=None, remote=None):
"""Performs an RPC function call (local or remote) with the given arguments.
:param str|unicode func_name: RPC function name to call.
:param Iterable args: Function arguments.
:param str|unicode remote:
:rtype: bytes|str
:raises ValueErr... | python | def make_rpc_call(func_name, args=None, remote=None):
"""Performs an RPC function call (local or remote) with the given arguments.
:param str|unicode func_name: RPC function name to call.
:param Iterable args: Function arguments.
:param str|unicode remote:
:rtype: bytes|str
:raises ValueErr... | [
"def",
"make_rpc_call",
"(",
"func_name",
",",
"args",
"=",
"None",
",",
"remote",
"=",
"None",
")",
":",
"args",
"=",
"args",
"or",
"[",
"]",
"args",
"=",
"[",
"encode",
"(",
"str",
"(",
"arg",
")",
")",
"for",
"arg",
"in",
"args",
"]",
"if",
... | Performs an RPC function call (local or remote) with the given arguments.
:param str|unicode func_name: RPC function name to call.
:param Iterable args: Function arguments.
:param str|unicode remote:
:rtype: bytes|str
:raises ValueError: If unable to call RPC function. | [
"Performs",
"an",
"RPC",
"function",
"call",
"(",
"local",
"or",
"remote",
")",
"with",
"the",
"given",
"arguments",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/runtime/rpc.py#L39-L61 |
idlesign/uwsgiconf | uwsgiconf/options/empire.py | Empire.set_emperor_command_params | def set_emperor_command_params(
self, command_socket=None,
wait_for_command=None, wait_for_command_exclude=None):
"""Emperor commands related parameters.
* http://uwsgi-docs.readthedocs.io/en/latest/tutorials/EmperorSubscriptions.html
:param str|unicode command_socket: ... | python | def set_emperor_command_params(
self, command_socket=None,
wait_for_command=None, wait_for_command_exclude=None):
"""Emperor commands related parameters.
* http://uwsgi-docs.readthedocs.io/en/latest/tutorials/EmperorSubscriptions.html
:param str|unicode command_socket: ... | [
"def",
"set_emperor_command_params",
"(",
"self",
",",
"command_socket",
"=",
"None",
",",
"wait_for_command",
"=",
"None",
",",
"wait_for_command_exclude",
"=",
"None",
")",
":",
"self",
".",
"_set",
"(",
"'emperor-command-socket'",
",",
"command_socket",
")",
"s... | Emperor commands related parameters.
* http://uwsgi-docs.readthedocs.io/en/latest/tutorials/EmperorSubscriptions.html
:param str|unicode command_socket: Enable the Emperor command socket.
It is a channel allowing external process to govern vassals.
:param bool wait_for_command: Al... | [
"Emperor",
"commands",
"related",
"parameters",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/empire.py#L62-L81 |
idlesign/uwsgiconf | uwsgiconf/options/empire.py | Empire.set_vassals_wrapper_params | def set_vassals_wrapper_params(self, wrapper=None, overrides=None, fallbacks=None):
"""Binary wrapper for vassals parameters.
:param str|unicode wrapper: Set a binary wrapper for vassals.
:param str|unicode|list[str|unicode] overrides: Set a binary wrapper for vassals to try before the default... | python | def set_vassals_wrapper_params(self, wrapper=None, overrides=None, fallbacks=None):
"""Binary wrapper for vassals parameters.
:param str|unicode wrapper: Set a binary wrapper for vassals.
:param str|unicode|list[str|unicode] overrides: Set a binary wrapper for vassals to try before the default... | [
"def",
"set_vassals_wrapper_params",
"(",
"self",
",",
"wrapper",
"=",
"None",
",",
"overrides",
"=",
"None",
",",
"fallbacks",
"=",
"None",
")",
":",
"self",
".",
"_set",
"(",
"'emperor-wrapper'",
",",
"wrapper",
")",
"self",
".",
"_set",
"(",
"'emperor-w... | Binary wrapper for vassals parameters.
:param str|unicode wrapper: Set a binary wrapper for vassals.
:param str|unicode|list[str|unicode] overrides: Set a binary wrapper for vassals to try before the default one
:param str|unicode|list[str|unicode] fallbacks: Set a binary wrapper for vassals ... | [
"Binary",
"wrapper",
"for",
"vassals",
"parameters",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/empire.py#L83-L99 |
idlesign/uwsgiconf | uwsgiconf/options/empire.py | Empire.set_throttle_params | def set_throttle_params(self, level=None, level_max=None):
"""Throttling options.
* http://uwsgi-docs.readthedocs.io/en/latest/Emperor.html#throttling
* http://uwsgi-docs.readthedocs.io/en/latest/Emperor.html#loyalty
:param int level: Set throttling level (in milliseconds) for bad beha... | python | def set_throttle_params(self, level=None, level_max=None):
"""Throttling options.
* http://uwsgi-docs.readthedocs.io/en/latest/Emperor.html#throttling
* http://uwsgi-docs.readthedocs.io/en/latest/Emperor.html#loyalty
:param int level: Set throttling level (in milliseconds) for bad beha... | [
"def",
"set_throttle_params",
"(",
"self",
",",
"level",
"=",
"None",
",",
"level_max",
"=",
"None",
")",
":",
"self",
".",
"_set",
"(",
"'emperor-throttle'",
",",
"level",
")",
"self",
".",
"_set",
"(",
"'emperor-max-throttle'",
",",
"level_max",
")",
"re... | Throttling options.
* http://uwsgi-docs.readthedocs.io/en/latest/Emperor.html#throttling
* http://uwsgi-docs.readthedocs.io/en/latest/Emperor.html#loyalty
:param int level: Set throttling level (in milliseconds) for bad behaving vassals. Default: 1000.
:param int level_max: Set maximu... | [
"Throttling",
"options",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/empire.py#L101-L116 |
idlesign/uwsgiconf | uwsgiconf/options/empire.py | Empire.set_tolerance_params | def set_tolerance_params(self, for_heartbeat=None, for_cursed_vassals=None):
"""Various tolerance options.
:param int for_heartbeat: Set the Emperor tolerance about heartbeats.
* http://uwsgi-docs.readthedocs.io/en/latest/Emperor.html#heartbeat-system
:param int for_cursed_vassals... | python | def set_tolerance_params(self, for_heartbeat=None, for_cursed_vassals=None):
"""Various tolerance options.
:param int for_heartbeat: Set the Emperor tolerance about heartbeats.
* http://uwsgi-docs.readthedocs.io/en/latest/Emperor.html#heartbeat-system
:param int for_cursed_vassals... | [
"def",
"set_tolerance_params",
"(",
"self",
",",
"for_heartbeat",
"=",
"None",
",",
"for_cursed_vassals",
"=",
"None",
")",
":",
"self",
".",
"_set",
"(",
"'emperor-required-heartbeat'",
",",
"for_heartbeat",
")",
"self",
".",
"_set",
"(",
"'emperor-curse-toleranc... | Various tolerance options.
:param int for_heartbeat: Set the Emperor tolerance about heartbeats.
* http://uwsgi-docs.readthedocs.io/en/latest/Emperor.html#heartbeat-system
:param int for_cursed_vassals: Set the Emperor tolerance about cursed vassals.
* http://uwsgi-docs.readt... | [
"Various",
"tolerance",
"options",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/empire.py#L118-L133 |
idlesign/uwsgiconf | uwsgiconf/options/empire.py | Empire.set_mode_tyrant_params | def set_mode_tyrant_params(self, enable=None, links_no_follow=None, use_initgroups=None):
"""Tyrant mode (secure multi-user hosting).
In Tyrant mode the Emperor will run the vassal using the UID/GID of the vassal
configuration file.
* http://uwsgi-docs.readthedocs.io/en/latest/Emperor.... | python | def set_mode_tyrant_params(self, enable=None, links_no_follow=None, use_initgroups=None):
"""Tyrant mode (secure multi-user hosting).
In Tyrant mode the Emperor will run the vassal using the UID/GID of the vassal
configuration file.
* http://uwsgi-docs.readthedocs.io/en/latest/Emperor.... | [
"def",
"set_mode_tyrant_params",
"(",
"self",
",",
"enable",
"=",
"None",
",",
"links_no_follow",
"=",
"None",
",",
"use_initgroups",
"=",
"None",
")",
":",
"self",
".",
"_set",
"(",
"'emperor-tyrant'",
",",
"enable",
",",
"cast",
"=",
"bool",
")",
"self",... | Tyrant mode (secure multi-user hosting).
In Tyrant mode the Emperor will run the vassal using the UID/GID of the vassal
configuration file.
* http://uwsgi-docs.readthedocs.io/en/latest/Emperor.html#tyrant-mode-secure-multi-user-hosting
:param enable: Puts the Emperor in Tyrant mode.
... | [
"Tyrant",
"mode",
"(",
"secure",
"multi",
"-",
"user",
"hosting",
")",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/empire.py#L135-L154 |
idlesign/uwsgiconf | uwsgiconf/options/empire.py | Empire.set_mode_broodlord_params | def set_mode_broodlord_params(
self, zerg_count=None,
vassal_overload_sos_interval=None, vassal_queue_items_sos=None):
"""This mode is a way for a vassal to ask for reinforcements to the Emperor.
Reinforcements are new vassals spawned on demand generally bound on the same socket... | python | def set_mode_broodlord_params(
self, zerg_count=None,
vassal_overload_sos_interval=None, vassal_queue_items_sos=None):
"""This mode is a way for a vassal to ask for reinforcements to the Emperor.
Reinforcements are new vassals spawned on demand generally bound on the same socket... | [
"def",
"set_mode_broodlord_params",
"(",
"self",
",",
"zerg_count",
"=",
"None",
",",
"vassal_overload_sos_interval",
"=",
"None",
",",
"vassal_queue_items_sos",
"=",
"None",
")",
":",
"self",
".",
"_set",
"(",
"'emperor-broodlord'",
",",
"zerg_count",
")",
"self"... | This mode is a way for a vassal to ask for reinforcements to the Emperor.
Reinforcements are new vassals spawned on demand generally bound on the same socket.
.. warning:: If you are looking for a way to dynamically adapt the number
of workers of an instance, check the Cheaper subsystem - ... | [
"This",
"mode",
"is",
"a",
"way",
"for",
"a",
"vassal",
"to",
"ask",
"for",
"reinforcements",
"to",
"the",
"Emperor",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/empire.py#L156-L181 |
idlesign/uwsgiconf | uwsgiconf/options/workers.py | Workers.run_command_as_worker | def run_command_as_worker(self, command, after_post_fork_hook=False):
"""Run the specified command as worker.
:param str|unicode command:
:param bool after_post_fork_hook: Whether to run it after `post_fork` hook.
"""
self._set('worker-exec2' if after_post_fork_hook else 'work... | python | def run_command_as_worker(self, command, after_post_fork_hook=False):
"""Run the specified command as worker.
:param str|unicode command:
:param bool after_post_fork_hook: Whether to run it after `post_fork` hook.
"""
self._set('worker-exec2' if after_post_fork_hook else 'work... | [
"def",
"run_command_as_worker",
"(",
"self",
",",
"command",
",",
"after_post_fork_hook",
"=",
"False",
")",
":",
"self",
".",
"_set",
"(",
"'worker-exec2'",
"if",
"after_post_fork_hook",
"else",
"'worker-exec'",
",",
"command",
",",
"multi",
"=",
"True",
")",
... | Run the specified command as worker.
:param str|unicode command:
:param bool after_post_fork_hook: Whether to run it after `post_fork` hook. | [
"Run",
"the",
"specified",
"command",
"as",
"worker",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/workers.py#L106-L116 |
idlesign/uwsgiconf | uwsgiconf/options/workers.py | Workers.set_count_auto | def set_count_auto(self, count=None):
"""Sets workers count.
By default sets it to detected number of available cores
:param int count:
"""
count = count or self._section.vars.CPU_CORES
self._set('workers', count)
return self._section | python | def set_count_auto(self, count=None):
"""Sets workers count.
By default sets it to detected number of available cores
:param int count:
"""
count = count or self._section.vars.CPU_CORES
self._set('workers', count)
return self._section | [
"def",
"set_count_auto",
"(",
"self",
",",
"count",
"=",
"None",
")",
":",
"count",
"=",
"count",
"or",
"self",
".",
"_section",
".",
"vars",
".",
"CPU_CORES",
"self",
".",
"_set",
"(",
"'workers'",
",",
"count",
")",
"return",
"self",
".",
"_section"
... | Sets workers count.
By default sets it to detected number of available cores
:param int count: | [
"Sets",
"workers",
"count",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/workers.py#L118-L129 |
idlesign/uwsgiconf | uwsgiconf/options/workers.py | Workers.set_thread_params | def set_thread_params(
self, enable=None, count=None, count_offload=None, stack_size=None, no_wait=None):
"""Sets threads related params.
:param bool enable: Enable threads in the embedded languages.
This will allow to spawn threads in your app.
.. warning:: Threads... | python | def set_thread_params(
self, enable=None, count=None, count_offload=None, stack_size=None, no_wait=None):
"""Sets threads related params.
:param bool enable: Enable threads in the embedded languages.
This will allow to spawn threads in your app.
.. warning:: Threads... | [
"def",
"set_thread_params",
"(",
"self",
",",
"enable",
"=",
"None",
",",
"count",
"=",
"None",
",",
"count_offload",
"=",
"None",
",",
"stack_size",
"=",
"None",
",",
"no_wait",
"=",
"None",
")",
":",
"self",
".",
"_set",
"(",
"'enable-threads'",
",",
... | Sets threads related params.
:param bool enable: Enable threads in the embedded languages.
This will allow to spawn threads in your app.
.. warning:: Threads will simply *not work* if this option is not enabled.
There will likely be no error, just no execution of your t... | [
"Sets",
"threads",
"related",
"params",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/workers.py#L131-L174 |
idlesign/uwsgiconf | uwsgiconf/options/workers.py | Workers.set_mules_params | def set_mules_params(
self, mules=None, touch_reload=None, harakiri_timeout=None, farms=None, reload_mercy=None,
msg_buffer=None, msg_buffer_recv=None):
"""Sets mules related params.
http://uwsgi.readthedocs.io/en/latest/Mules.html
Mules are worker processes living in t... | python | def set_mules_params(
self, mules=None, touch_reload=None, harakiri_timeout=None, farms=None, reload_mercy=None,
msg_buffer=None, msg_buffer_recv=None):
"""Sets mules related params.
http://uwsgi.readthedocs.io/en/latest/Mules.html
Mules are worker processes living in t... | [
"def",
"set_mules_params",
"(",
"self",
",",
"mules",
"=",
"None",
",",
"touch_reload",
"=",
"None",
",",
"harakiri_timeout",
"=",
"None",
",",
"farms",
"=",
"None",
",",
"reload_mercy",
"=",
"None",
",",
"msg_buffer",
"=",
"None",
",",
"msg_buffer_recv",
... | Sets mules related params.
http://uwsgi.readthedocs.io/en/latest/Mules.html
Mules are worker processes living in the uWSGI stack but not reachable via socket connections,
that can be used as a generic subsystem to offload tasks.
:param int|list mules: Add the specified mules or number... | [
"Sets",
"mules",
"related",
"params",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/workers.py#L176-L241 |
idlesign/uwsgiconf | uwsgiconf/options/workers.py | Workers.set_reload_params | def set_reload_params(
self, min_lifetime=None, max_lifetime=None,
max_requests=None, max_requests_delta=None,
max_addr_space=None, max_rss=None, max_uss=None, max_pss=None,
max_addr_space_forced=None, max_rss_forced=None, watch_interval_forced=None,
mercy=Non... | python | def set_reload_params(
self, min_lifetime=None, max_lifetime=None,
max_requests=None, max_requests_delta=None,
max_addr_space=None, max_rss=None, max_uss=None, max_pss=None,
max_addr_space_forced=None, max_rss_forced=None, watch_interval_forced=None,
mercy=Non... | [
"def",
"set_reload_params",
"(",
"self",
",",
"min_lifetime",
"=",
"None",
",",
"max_lifetime",
"=",
"None",
",",
"max_requests",
"=",
"None",
",",
"max_requests_delta",
"=",
"None",
",",
"max_addr_space",
"=",
"None",
",",
"max_rss",
"=",
"None",
",",
"max_... | Sets workers reload parameters.
:param int min_lifetime: A worker cannot be destroyed/reloaded unless it has been alive
for N seconds (default 60). This is an anti-fork-bomb measure.
Since 1.9
:param int max_lifetime: Reload workers after this many seconds. Disabled by default.... | [
"Sets",
"workers",
"reload",
"parameters",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/workers.py#L243-L319 |
idlesign/uwsgiconf | uwsgiconf/options/workers.py | Workers.set_reload_on_exception_params | def set_reload_on_exception_params(self, do_reload=None, etype=None, evalue=None, erepr=None):
"""Sets workers reload on exceptions parameters.
:param bool do_reload: Reload a worker when an exception is raised.
:param str etype: Reload a worker when a specific exception type is raised.
... | python | def set_reload_on_exception_params(self, do_reload=None, etype=None, evalue=None, erepr=None):
"""Sets workers reload on exceptions parameters.
:param bool do_reload: Reload a worker when an exception is raised.
:param str etype: Reload a worker when a specific exception type is raised.
... | [
"def",
"set_reload_on_exception_params",
"(",
"self",
",",
"do_reload",
"=",
"None",
",",
"etype",
"=",
"None",
",",
"evalue",
"=",
"None",
",",
"erepr",
"=",
"None",
")",
":",
"self",
".",
"_set",
"(",
"'reload-on-exception'",
",",
"do_reload",
",",
"cast... | Sets workers reload on exceptions parameters.
:param bool do_reload: Reload a worker when an exception is raised.
:param str etype: Reload a worker when a specific exception type is raised.
:param str evalue: Reload a worker when a specific exception value is raised.
:param str erepr... | [
"Sets",
"workers",
"reload",
"on",
"exceptions",
"parameters",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/workers.py#L321-L338 |
idlesign/uwsgiconf | uwsgiconf/options/workers.py | Workers.set_harakiri_params | def set_harakiri_params(self, timeout=None, verbose=None, disable_for_arh=None):
"""Sets workers harakiri parameters.
: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 c... | python | def set_harakiri_params(self, timeout=None, verbose=None, disable_for_arh=None):
"""Sets workers harakiri parameters.
: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 c... | [
"def",
"set_harakiri_params",
"(",
"self",
",",
"timeout",
"=",
"None",
",",
"verbose",
"=",
"None",
",",
"disable_for_arh",
"=",
"None",
")",
":",
"self",
".",
"_set",
"(",
"'harakiri'",
",",
"timeout",
")",
"self",
".",
"_set",
"(",
"'harakiri-verbose'",... | Sets workers harakiri parameters.
: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 bool verbose: Haraki... | [
"Sets",
"workers",
"harakiri",
"parameters",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/workers.py#L340-L360 |
idlesign/uwsgiconf | uwsgiconf/options/workers.py | Workers.set_zerg_server_params | def set_zerg_server_params(self, socket, clients_socket_pool=None):
"""Zerg mode. Zerg server params.
When your site load is variable, it would be nice to be able to add
workers dynamically. Enabling Zerg mode you can allow zerg clients to attach
to your already running server and help ... | python | def set_zerg_server_params(self, socket, clients_socket_pool=None):
"""Zerg mode. Zerg server params.
When your site load is variable, it would be nice to be able to add
workers dynamically. Enabling Zerg mode you can allow zerg clients to attach
to your already running server and help ... | [
"def",
"set_zerg_server_params",
"(",
"self",
",",
"socket",
",",
"clients_socket_pool",
"=",
"None",
")",
":",
"if",
"clients_socket_pool",
":",
"self",
".",
"_set",
"(",
"'zergpool'",
",",
"'%s:%s'",
"%",
"(",
"socket",
",",
"','",
".",
"join",
"(",
"lis... | Zerg mode. Zerg server params.
When your site load is variable, it would be nice to be able to add
workers dynamically. Enabling Zerg mode you can allow zerg clients to attach
to your already running server and help it in the work.
* http://uwsgi-docs.readthedocs.io/en/latest/Zerg.html... | [
"Zerg",
"mode",
".",
"Zerg",
"server",
"params",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/workers.py#L362-L392 |
idlesign/uwsgiconf | uwsgiconf/options/workers.py | Workers.set_zerg_client_params | def set_zerg_client_params(self, server_sockets, use_fallback_socket=None):
"""Zerg mode. Zergs params.
:param str|unicode|list[str|unicode] server_sockets: Attaches zerg to a zerg server.
:param bool use_fallback_socket: Fallback to normal sockets if the zerg server is not available
... | python | def set_zerg_client_params(self, server_sockets, use_fallback_socket=None):
"""Zerg mode. Zergs params.
:param str|unicode|list[str|unicode] server_sockets: Attaches zerg to a zerg server.
:param bool use_fallback_socket: Fallback to normal sockets if the zerg server is not available
... | [
"def",
"set_zerg_client_params",
"(",
"self",
",",
"server_sockets",
",",
"use_fallback_socket",
"=",
"None",
")",
":",
"self",
".",
"_set",
"(",
"'zerg'",
",",
"server_sockets",
",",
"multi",
"=",
"True",
")",
"if",
"use_fallback_socket",
"is",
"not",
"None",... | Zerg mode. Zergs params.
:param str|unicode|list[str|unicode] server_sockets: Attaches zerg to a zerg server.
:param bool use_fallback_socket: Fallback to normal sockets if the zerg server is not available | [
"Zerg",
"mode",
".",
"Zergs",
"params",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/workers.py#L394-L410 |
idlesign/uwsgiconf | uwsgiconf/formatters.py | format_print_text | def format_print_text(text, color_fg=None, color_bg=None):
"""Format given text using ANSI formatting escape sequences.
Could be useful gfor print command.
:param str|unicode text:
:param str|unicode color_fg: text (foreground) color
:param str|unicode color_bg: text (background) color
:rtype:... | python | def format_print_text(text, color_fg=None, color_bg=None):
"""Format given text using ANSI formatting escape sequences.
Could be useful gfor print command.
:param str|unicode text:
:param str|unicode color_fg: text (foreground) color
:param str|unicode color_bg: text (background) color
:rtype:... | [
"def",
"format_print_text",
"(",
"text",
",",
"color_fg",
"=",
"None",
",",
"color_bg",
"=",
"None",
")",
":",
"from",
".",
"config",
"import",
"Section",
"color_fg",
"=",
"{",
"'black'",
":",
"'30'",
",",
"'red'",
":",
"'31'",
",",
"'reder'",
":",
"'9... | Format given text using ANSI formatting escape sequences.
Could be useful gfor print command.
:param str|unicode text:
:param str|unicode color_fg: text (foreground) color
:param str|unicode color_bg: text (background) color
:rtype: str|unicode | [
"Format",
"given",
"text",
"using",
"ANSI",
"formatting",
"escape",
"sequences",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/formatters.py#L3-L66 |
idlesign/uwsgiconf | uwsgiconf/formatters.py | FormatterBase.iter_options | def iter_options(self):
"""Iterates configuration sections groups options."""
for section in self.sections:
name = str(section)
for key, value in section._get_options():
yield name, key, value | python | def iter_options(self):
"""Iterates configuration sections groups options."""
for section in self.sections:
name = str(section)
for key, value in section._get_options():
yield name, key, value | [
"def",
"iter_options",
"(",
"self",
")",
":",
"for",
"section",
"in",
"self",
".",
"sections",
":",
"name",
"=",
"str",
"(",
"section",
")",
"for",
"key",
",",
"value",
"in",
"section",
".",
"_get_options",
"(",
")",
":",
"yield",
"name",
",",
"key",... | Iterates configuration sections groups options. | [
"Iterates",
"configuration",
"sections",
"groups",
"options",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/formatters.py#L75-L80 |
idlesign/uwsgiconf | uwsgiconf/options/main_process.py | MainProcess.set_memory_params | def set_memory_params(self, ksm_interval=None, no_swap=None):
"""Set memory related parameters.
:param int ksm_interval: Kernel Samepage Merging frequency option, that can reduce memory usage.
Accepts a number of requests (or master process cycles) to run page scanner after.
..... | python | def set_memory_params(self, ksm_interval=None, no_swap=None):
"""Set memory related parameters.
:param int ksm_interval: Kernel Samepage Merging frequency option, that can reduce memory usage.
Accepts a number of requests (or master process cycles) to run page scanner after.
..... | [
"def",
"set_memory_params",
"(",
"self",
",",
"ksm_interval",
"=",
"None",
",",
"no_swap",
"=",
"None",
")",
":",
"self",
".",
"_set",
"(",
"'ksm'",
",",
"ksm_interval",
")",
"self",
".",
"_set",
"(",
"'never_swap'",
",",
"no_swap",
",",
"cast",
"=",
"... | Set memory related parameters.
:param int ksm_interval: Kernel Samepage Merging frequency option, that can reduce memory usage.
Accepts a number of requests (or master process cycles) to run page scanner after.
.. note:: Linux only.
* http://uwsgi.readthedocs.io/en/latest/... | [
"Set",
"memory",
"related",
"parameters",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/main_process.py#L209-L225 |
idlesign/uwsgiconf | uwsgiconf/options/main_process.py | MainProcess.daemonize | def daemonize(self, log_into, after_app_loading=False):
"""Daemonize uWSGI.
:param str|unicode log_into: Logging destination:
* File: /tmp/mylog.log
* UPD: 192.168.1.2:1717
.. note:: This will require an UDP server to manage log messages.
U... | python | def daemonize(self, log_into, after_app_loading=False):
"""Daemonize uWSGI.
:param str|unicode log_into: Logging destination:
* File: /tmp/mylog.log
* UPD: 192.168.1.2:1717
.. note:: This will require an UDP server to manage log messages.
U... | [
"def",
"daemonize",
"(",
"self",
",",
"log_into",
",",
"after_app_loading",
"=",
"False",
")",
":",
"self",
".",
"_set",
"(",
"'daemonize2'",
"if",
"after_app_loading",
"else",
"'daemonize'",
",",
"log_into",
")",
"return",
"self",
".",
"_section"
] | Daemonize uWSGI.
:param str|unicode log_into: Logging destination:
* File: /tmp/mylog.log
* UPD: 192.168.1.2:1717
.. note:: This will require an UDP server to manage log messages.
Use ``networking.register_socket('192.168.1.2:1717, type=networking.... | [
"Daemonize",
"uWSGI",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/main_process.py#L227-L246 |
idlesign/uwsgiconf | uwsgiconf/options/main_process.py | MainProcess.change_dir | def change_dir(self, to, after_app_loading=False):
"""Chdir to specified directory before or after apps loading.
:param str|unicode to: Target directory.
:param bool after_app_loading:
*True* - after load
*False* - before load
"""
self._set('chd... | python | def change_dir(self, to, after_app_loading=False):
"""Chdir to specified directory before or after apps loading.
:param str|unicode to: Target directory.
:param bool after_app_loading:
*True* - after load
*False* - before load
"""
self._set('chd... | [
"def",
"change_dir",
"(",
"self",
",",
"to",
",",
"after_app_loading",
"=",
"False",
")",
":",
"self",
".",
"_set",
"(",
"'chdir2'",
"if",
"after_app_loading",
"else",
"'chdir'",
",",
"to",
")",
"return",
"self",
".",
"_section"
] | Chdir to specified directory before or after apps loading.
:param str|unicode to: Target directory.
:param bool after_app_loading:
*True* - after load
*False* - before load | [
"Chdir",
"to",
"specified",
"directory",
"before",
"or",
"after",
"apps",
"loading",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/main_process.py#L248-L260 |
idlesign/uwsgiconf | uwsgiconf/options/main_process.py | MainProcess.set_owner_params | def set_owner_params(self, uid=None, gid=None, add_gids=None, set_asap=False):
"""Set process owner params - user, group.
:param str|unicode|int uid: Set uid to the specified username or uid.
:param str|unicode|int gid: Set gid to the specified groupname or gid.
:param list|str|unicod... | python | def set_owner_params(self, uid=None, gid=None, add_gids=None, set_asap=False):
"""Set process owner params - user, group.
:param str|unicode|int uid: Set uid to the specified username or uid.
:param str|unicode|int gid: Set gid to the specified groupname or gid.
:param list|str|unicod... | [
"def",
"set_owner_params",
"(",
"self",
",",
"uid",
"=",
"None",
",",
"gid",
"=",
"None",
",",
"add_gids",
"=",
"None",
",",
"set_asap",
"=",
"False",
")",
":",
"prefix",
"=",
"'immediate-'",
"if",
"set_asap",
"else",
"''",
"self",
".",
"_set",
"(",
... | Set process owner params - user, group.
:param str|unicode|int uid: Set uid to the specified username or uid.
:param str|unicode|int gid: Set gid to the specified groupname or gid.
:param list|str|unicode|int add_gids: Add the specified group id to the process credentials.
This op... | [
"Set",
"process",
"owner",
"params",
"-",
"user",
"group",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/main_process.py#L262-L287 |
idlesign/uwsgiconf | uwsgiconf/options/main_process.py | MainProcess.get_owner | def get_owner(self, default=True):
"""Return (User ID, Group ID) tuple
:param bool default: Whether to return default if not set.
:rtype: tuple[int, int]
"""
uid, gid = self.owner
if not uid and default:
uid = os.getuid()
if not gid and default:
... | python | def get_owner(self, default=True):
"""Return (User ID, Group ID) tuple
:param bool default: Whether to return default if not set.
:rtype: tuple[int, int]
"""
uid, gid = self.owner
if not uid and default:
uid = os.getuid()
if not gid and default:
... | [
"def",
"get_owner",
"(",
"self",
",",
"default",
"=",
"True",
")",
":",
"uid",
",",
"gid",
"=",
"self",
".",
"owner",
"if",
"not",
"uid",
"and",
"default",
":",
"uid",
"=",
"os",
".",
"getuid",
"(",
")",
"if",
"not",
"gid",
"and",
"default",
":",... | Return (User ID, Group ID) tuple
:param bool default: Whether to return default if not set.
:rtype: tuple[int, int] | [
"Return",
"(",
"User",
"ID",
"Group",
"ID",
")",
"tuple"
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/main_process.py#L289-L303 |
idlesign/uwsgiconf | uwsgiconf/options/main_process.py | MainProcess.set_hook | def set_hook(self, phase, action):
"""Allows setting hooks (attaching actions) for various uWSGI phases.
:param str|unicode phase: See constants in ``.phases``.
:param str|unicode|list|HookAction|list[HookAction] action:
"""
self._set('hook-%s' % phase, action, multi=True)
... | python | def set_hook(self, phase, action):
"""Allows setting hooks (attaching actions) for various uWSGI phases.
:param str|unicode phase: See constants in ``.phases``.
:param str|unicode|list|HookAction|list[HookAction] action:
"""
self._set('hook-%s' % phase, action, multi=True)
... | [
"def",
"set_hook",
"(",
"self",
",",
"phase",
",",
"action",
")",
":",
"self",
".",
"_set",
"(",
"'hook-%s'",
"%",
"phase",
",",
"action",
",",
"multi",
"=",
"True",
")",
"return",
"self",
".",
"_section"
] | Allows setting hooks (attaching actions) for various uWSGI phases.
:param str|unicode phase: See constants in ``.phases``.
:param str|unicode|list|HookAction|list[HookAction] action: | [
"Allows",
"setting",
"hooks",
"(",
"attaching",
"actions",
")",
"for",
"various",
"uWSGI",
"phases",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/main_process.py#L305-L315 |
idlesign/uwsgiconf | uwsgiconf/options/main_process.py | MainProcess.set_hook_touch | def set_hook_touch(self, fpath, action):
"""Allows running certain action when the specified file is touched.
:param str|unicode fpath: File path.
:param str|unicode|list|HookAction|list[HookAction] action:
"""
self._set('hook-touch', '%s %s' % (fpath, action), multi=True)
... | python | def set_hook_touch(self, fpath, action):
"""Allows running certain action when the specified file is touched.
:param str|unicode fpath: File path.
:param str|unicode|list|HookAction|list[HookAction] action:
"""
self._set('hook-touch', '%s %s' % (fpath, action), multi=True)
... | [
"def",
"set_hook_touch",
"(",
"self",
",",
"fpath",
",",
"action",
")",
":",
"self",
".",
"_set",
"(",
"'hook-touch'",
",",
"'%s %s'",
"%",
"(",
"fpath",
",",
"action",
")",
",",
"multi",
"=",
"True",
")",
"return",
"self",
".",
"_section"
] | Allows running certain action when the specified file is touched.
:param str|unicode fpath: File path.
:param str|unicode|list|HookAction|list[HookAction] action: | [
"Allows",
"running",
"certain",
"action",
"when",
"the",
"specified",
"file",
"is",
"touched",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/main_process.py#L317-L327 |
idlesign/uwsgiconf | uwsgiconf/options/main_process.py | MainProcess.set_hook_after_request | def set_hook_after_request(self, func):
"""Run the specified function/symbol (C level) after each request.
:param str|unicode func:
"""
self._set('after-request-hook', func, multi=True)
return self._section | python | def set_hook_after_request(self, func):
"""Run the specified function/symbol (C level) after each request.
:param str|unicode func:
"""
self._set('after-request-hook', func, multi=True)
return self._section | [
"def",
"set_hook_after_request",
"(",
"self",
",",
"func",
")",
":",
"self",
".",
"_set",
"(",
"'after-request-hook'",
",",
"func",
",",
"multi",
"=",
"True",
")",
"return",
"self",
".",
"_section"
] | Run the specified function/symbol (C level) after each request.
:param str|unicode func: | [
"Run",
"the",
"specified",
"function",
"/",
"symbol",
"(",
"C",
"level",
")",
"after",
"each",
"request",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/main_process.py#L329-L337 |
idlesign/uwsgiconf | uwsgiconf/options/main_process.py | MainProcess.set_on_exit_params | def set_on_exit_params(self, skip_hooks=None, skip_teardown=None):
"""Set params related to process exit procedure.
:param bool skip_hooks: Skip ``EXIT`` phase hook.
.. note:: Ignored by the master.
:param bool skip_teardown: Allows skipping teardown (finalization) processes for s... | python | def set_on_exit_params(self, skip_hooks=None, skip_teardown=None):
"""Set params related to process exit procedure.
:param bool skip_hooks: Skip ``EXIT`` phase hook.
.. note:: Ignored by the master.
:param bool skip_teardown: Allows skipping teardown (finalization) processes for s... | [
"def",
"set_on_exit_params",
"(",
"self",
",",
"skip_hooks",
"=",
"None",
",",
"skip_teardown",
"=",
"None",
")",
":",
"self",
".",
"_set",
"(",
"'skip-atexit'",
",",
"skip_hooks",
",",
"cast",
"=",
"bool",
")",
"self",
".",
"_set",
"(",
"'skip-atexit-tear... | Set params related to process exit procedure.
:param bool skip_hooks: Skip ``EXIT`` phase hook.
.. note:: Ignored by the master.
:param bool skip_teardown: Allows skipping teardown (finalization) processes for some plugins.
.. note:: Ignored by the master.
Suppor... | [
"Set",
"params",
"related",
"to",
"process",
"exit",
"procedure",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/main_process.py#L339-L358 |
idlesign/uwsgiconf | uwsgiconf/options/main_process.py | MainProcess.run_command_on_event | def run_command_on_event(self, command, phase=phases.ASAP):
"""Run the given command on a given phase.
:param str|unicode command:
:param str|unicode phase: See constants in ``Phases`` class.
"""
self._set('exec-%s' % phase, command, multi=True)
return self._section | python | def run_command_on_event(self, command, phase=phases.ASAP):
"""Run the given command on a given phase.
:param str|unicode command:
:param str|unicode phase: See constants in ``Phases`` class.
"""
self._set('exec-%s' % phase, command, multi=True)
return self._section | [
"def",
"run_command_on_event",
"(",
"self",
",",
"command",
",",
"phase",
"=",
"phases",
".",
"ASAP",
")",
":",
"self",
".",
"_set",
"(",
"'exec-%s'",
"%",
"phase",
",",
"command",
",",
"multi",
"=",
"True",
")",
"return",
"self",
".",
"_section"
] | Run the given command on a given phase.
:param str|unicode command:
:param str|unicode phase: See constants in ``Phases`` class. | [
"Run",
"the",
"given",
"command",
"on",
"a",
"given",
"phase",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/main_process.py#L360-L370 |
idlesign/uwsgiconf | uwsgiconf/options/main_process.py | MainProcess.run_command_on_touch | def run_command_on_touch(self, command, target):
"""Run command when the specified file is modified/touched.
:param str|unicode command:
:param str|unicode target: File path.
"""
self._set('touch-exec', '%s %s' % (target, command), multi=True)
return self._section | python | def run_command_on_touch(self, command, target):
"""Run command when the specified file is modified/touched.
:param str|unicode command:
:param str|unicode target: File path.
"""
self._set('touch-exec', '%s %s' % (target, command), multi=True)
return self._section | [
"def",
"run_command_on_touch",
"(",
"self",
",",
"command",
",",
"target",
")",
":",
"self",
".",
"_set",
"(",
"'touch-exec'",
",",
"'%s %s'",
"%",
"(",
"target",
",",
"command",
")",
",",
"multi",
"=",
"True",
")",
"return",
"self",
".",
"_section"
] | Run command when the specified file is modified/touched.
:param str|unicode command:
:param str|unicode target: File path. | [
"Run",
"command",
"when",
"the",
"specified",
"file",
"is",
"modified",
"/",
"touched",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/main_process.py#L372-L382 |
idlesign/uwsgiconf | uwsgiconf/options/main_process.py | MainProcess.set_pid_file | def set_pid_file(self, fpath, before_priv_drop=True, safe=False):
"""Creates pidfile before or after privileges drop.
:param str|unicode fpath: File path.
:param bool before_priv_drop: Whether to create pidfile before privileges are dropped.
.. note:: Vacuum is made after privileg... | python | def set_pid_file(self, fpath, before_priv_drop=True, safe=False):
"""Creates pidfile before or after privileges drop.
:param str|unicode fpath: File path.
:param bool before_priv_drop: Whether to create pidfile before privileges are dropped.
.. note:: Vacuum is made after privileg... | [
"def",
"set_pid_file",
"(",
"self",
",",
"fpath",
",",
"before_priv_drop",
"=",
"True",
",",
"safe",
"=",
"False",
")",
":",
"command",
"=",
"'pidfile'",
"if",
"not",
"before_priv_drop",
":",
"command",
"+=",
"'2'",
"if",
"safe",
":",
"command",
"=",
"'s... | Creates pidfile before or after privileges drop.
:param str|unicode fpath: File path.
:param bool before_priv_drop: Whether to create pidfile before privileges are dropped.
.. note:: Vacuum is made after privileges drop, so it may not be able
to delete PID file if it was c... | [
"Creates",
"pidfile",
"before",
"or",
"after",
"privileges",
"drop",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/main_process.py#L384-L410 |
idlesign/uwsgiconf | uwsgiconf/options/main_process.py | MainProcess.set_naming_params | def set_naming_params(self, autonaming=None, prefix=None, suffix=None, name=None):
"""Setups processes naming parameters.
:param bool autonaming: Automatically set process name to something meaningful.
Generated process names may be 'uWSGI Master', 'uWSGI Worker #', etc.
:param str... | python | def set_naming_params(self, autonaming=None, prefix=None, suffix=None, name=None):
"""Setups processes naming parameters.
:param bool autonaming: Automatically set process name to something meaningful.
Generated process names may be 'uWSGI Master', 'uWSGI Worker #', etc.
:param str... | [
"def",
"set_naming_params",
"(",
"self",
",",
"autonaming",
"=",
"None",
",",
"prefix",
"=",
"None",
",",
"suffix",
"=",
"None",
",",
"name",
"=",
"None",
")",
":",
"self",
".",
"_set",
"(",
"'auto-procname'",
",",
"autonaming",
",",
"cast",
"=",
"bool... | Setups processes naming parameters.
:param bool autonaming: Automatically set process name to something meaningful.
Generated process names may be 'uWSGI Master', 'uWSGI Worker #', etc.
:param str|unicode prefix: Add prefix to process names.
:param str|unicode suffix: Append strin... | [
"Setups",
"processes",
"naming",
"parameters",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/main_process.py#L412-L430 |
idlesign/uwsgiconf | uwsgiconf/cli.py | errorprint | def errorprint():
"""Print out descriptions from ConfigurationError."""
try:
yield
except ConfigurationError as e:
click.secho('%s' % e, err=True, fg='red')
sys.exit(1) | python | def errorprint():
"""Print out descriptions from ConfigurationError."""
try:
yield
except ConfigurationError as e:
click.secho('%s' % e, err=True, fg='red')
sys.exit(1) | [
"def",
"errorprint",
"(",
")",
":",
"try",
":",
"yield",
"except",
"ConfigurationError",
"as",
"e",
":",
"click",
".",
"secho",
"(",
"'%s'",
"%",
"e",
",",
"err",
"=",
"True",
",",
"fg",
"=",
"'red'",
")",
"sys",
".",
"exit",
"(",
"1",
")"
] | Print out descriptions from ConfigurationError. | [
"Print",
"out",
"descriptions",
"from",
"ConfigurationError",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/cli.py#L13-L20 |
idlesign/uwsgiconf | uwsgiconf/cli.py | run | def run(conf, only):
"""Runs uWSGI passing to it using the default or another `uwsgiconf` configuration module.
"""
with errorprint():
config = ConfModule(conf)
spawned = config.spawn_uwsgi(only)
for alias, pid in spawned:
click.secho("Spawned uWSGI for configuration al... | python | def run(conf, only):
"""Runs uWSGI passing to it using the default or another `uwsgiconf` configuration module.
"""
with errorprint():
config = ConfModule(conf)
spawned = config.spawn_uwsgi(only)
for alias, pid in spawned:
click.secho("Spawned uWSGI for configuration al... | [
"def",
"run",
"(",
"conf",
",",
"only",
")",
":",
"with",
"errorprint",
"(",
")",
":",
"config",
"=",
"ConfModule",
"(",
"conf",
")",
"spawned",
"=",
"config",
".",
"spawn_uwsgi",
"(",
"only",
")",
"for",
"alias",
",",
"pid",
"in",
"spawned",
":",
... | Runs uWSGI passing to it using the default or another `uwsgiconf` configuration module. | [
"Runs",
"uWSGI",
"passing",
"to",
"it",
"using",
"the",
"default",
"or",
"another",
"uwsgiconf",
"configuration",
"module",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/cli.py#L39-L48 |
idlesign/uwsgiconf | uwsgiconf/cli.py | compile | def compile(conf):
"""Compiles classic uWSGI configuration file using the default
or given `uwsgiconf` configuration module.
"""
with errorprint():
config = ConfModule(conf)
for conf in config.configurations:
conf.format(do_print=True) | python | def compile(conf):
"""Compiles classic uWSGI configuration file using the default
or given `uwsgiconf` configuration module.
"""
with errorprint():
config = ConfModule(conf)
for conf in config.configurations:
conf.format(do_print=True) | [
"def",
"compile",
"(",
"conf",
")",
":",
"with",
"errorprint",
"(",
")",
":",
"config",
"=",
"ConfModule",
"(",
"conf",
")",
"for",
"conf",
"in",
"config",
".",
"configurations",
":",
"conf",
".",
"format",
"(",
"do_print",
"=",
"True",
")"
] | Compiles classic uWSGI configuration file using the default
or given `uwsgiconf` configuration module. | [
"Compiles",
"classic",
"uWSGI",
"configuration",
"file",
"using",
"the",
"default",
"or",
"given",
"uwsgiconf",
"configuration",
"module",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/cli.py#L53-L61 |
idlesign/uwsgiconf | uwsgiconf/cli.py | sysinit | def sysinit(systype, conf, project):
"""Outputs configuration for system initialization subsystem."""
click.secho(get_config(
systype,
conf=ConfModule(conf).configurations[0],
conf_path=conf,
project_name=project,
)) | python | def sysinit(systype, conf, project):
"""Outputs configuration for system initialization subsystem."""
click.secho(get_config(
systype,
conf=ConfModule(conf).configurations[0],
conf_path=conf,
project_name=project,
)) | [
"def",
"sysinit",
"(",
"systype",
",",
"conf",
",",
"project",
")",
":",
"click",
".",
"secho",
"(",
"get_config",
"(",
"systype",
",",
"conf",
"=",
"ConfModule",
"(",
"conf",
")",
".",
"configurations",
"[",
"0",
"]",
",",
"conf_path",
"=",
"conf",
... | Outputs configuration for system initialization subsystem. | [
"Outputs",
"configuration",
"for",
"system",
"initialization",
"subsystem",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/cli.py#L68-L76 |
idlesign/uwsgiconf | uwsgiconf/cli.py | probe_plugins | def probe_plugins():
"""Runs uWSGI to determine what plugins are available and prints them out.
Generic plugins come first then after blank line follow request plugins.
"""
plugins = UwsgiRunner().get_plugins()
for plugin in sorted(plugins.generic):
click.secho(plugin)
click.secho(''... | python | def probe_plugins():
"""Runs uWSGI to determine what plugins are available and prints them out.
Generic plugins come first then after blank line follow request plugins.
"""
plugins = UwsgiRunner().get_plugins()
for plugin in sorted(plugins.generic):
click.secho(plugin)
click.secho(''... | [
"def",
"probe_plugins",
"(",
")",
":",
"plugins",
"=",
"UwsgiRunner",
"(",
")",
".",
"get_plugins",
"(",
")",
"for",
"plugin",
"in",
"sorted",
"(",
"plugins",
".",
"generic",
")",
":",
"click",
".",
"secho",
"(",
"plugin",
")",
"click",
".",
"secho",
... | Runs uWSGI to determine what plugins are available and prints them out.
Generic plugins come first then after blank line follow request plugins. | [
"Runs",
"uWSGI",
"to",
"determine",
"what",
"plugins",
"are",
"available",
"and",
"prints",
"them",
"out",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/cli.py#L80-L94 |
idlesign/uwsgiconf | uwsgiconf/runtime/signals.py | Signal.register_handler | def register_handler(self, target=None):
"""Decorator for a function to be used as a signal handler.
:param str|unicode target: Where this signal will be delivered to. Default: ``worker``.
* ``workers`` - run the signal handler on all the workers
* ``workerN`` - run the signal... | python | def register_handler(self, target=None):
"""Decorator for a function to be used as a signal handler.
:param str|unicode target: Where this signal will be delivered to. Default: ``worker``.
* ``workers`` - run the signal handler on all the workers
* ``workerN`` - run the signal... | [
"def",
"register_handler",
"(",
"self",
",",
"target",
"=",
"None",
")",
":",
"target",
"=",
"target",
"or",
"'worker'",
"sign_num",
"=",
"self",
".",
"num",
"def",
"wrapper",
"(",
"func",
")",
":",
"_LOG",
".",
"debug",
"(",
"\"Registering '%s' as signal ... | Decorator for a function to be used as a signal handler.
:param str|unicode target: Where this signal will be delivered to. Default: ``worker``.
* ``workers`` - run the signal handler on all the workers
* ``workerN`` - run the signal handler only on worker N
* ``worker``/`... | [
"Decorator",
"for",
"a",
"function",
"to",
"be",
"used",
"as",
"a",
"signal",
"handler",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/runtime/signals.py#L48-L79 |
idlesign/uwsgiconf | uwsgiconf/options/spooler.py | Spooler.add | def add(self, work_dir, external=False):
"""Run a spooler on the specified directory.
:param str|unicode work_dir:
.. note:: Placeholders can be used to build paths, e.g.: {project_runtime_dir}/spool/
See ``Section.project_name`` and ``Section.runtime_dir``.
:param b... | python | def add(self, work_dir, external=False):
"""Run a spooler on the specified directory.
:param str|unicode work_dir:
.. note:: Placeholders can be used to build paths, e.g.: {project_runtime_dir}/spool/
See ``Section.project_name`` and ``Section.runtime_dir``.
:param b... | [
"def",
"add",
"(",
"self",
",",
"work_dir",
",",
"external",
"=",
"False",
")",
":",
"command",
"=",
"'spooler'",
"if",
"external",
":",
"command",
"+=",
"'-external'",
"self",
".",
"_set",
"(",
"command",
",",
"self",
".",
"_section",
".",
"replace_plac... | Run a spooler on the specified directory.
:param str|unicode work_dir:
.. note:: Placeholders can be used to build paths, e.g.: {project_runtime_dir}/spool/
See ``Section.project_name`` and ``Section.runtime_dir``.
:param bool external: map spoolers requests to a spooler dir... | [
"Run",
"a",
"spooler",
"on",
"the",
"specified",
"directory",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/spooler.py#L64-L82 |
idlesign/uwsgiconf | uwsgiconf/presets/empire.py | Broodlord.configure | def configure(self):
"""Configures broodlord mode and returns emperor and zerg sections.
:rtype: tuple
"""
section_emperor = self.section_emperor
section_zerg = self.section_zerg
socket = self.socket
section_emperor.workers.set_zerg_server_params(socket=socket)... | python | def configure(self):
"""Configures broodlord mode and returns emperor and zerg sections.
:rtype: tuple
"""
section_emperor = self.section_emperor
section_zerg = self.section_zerg
socket = self.socket
section_emperor.workers.set_zerg_server_params(socket=socket)... | [
"def",
"configure",
"(",
"self",
")",
":",
"section_emperor",
"=",
"self",
".",
"section_emperor",
"section_zerg",
"=",
"self",
".",
"section_zerg",
"socket",
"=",
"self",
".",
"socket",
"section_emperor",
".",
"workers",
".",
"set_zerg_server_params",
"(",
"soc... | Configures broodlord mode and returns emperor and zerg sections.
:rtype: tuple | [
"Configures",
"broodlord",
"mode",
"and",
"returns",
"emperor",
"and",
"zerg",
"sections",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/presets/empire.py#L54-L74 |
idlesign/uwsgiconf | uwsgiconf/presets/nice.py | Section.get_log_format_default | def get_log_format_default(self):
"""Returns default log message format.
.. note:: Some params may be missing.
"""
vars = self.logging.vars
format_default = (
'[pid: %s|app: %s|req: %s/%s] %s (%s) {%s vars in %s bytes} [%s] %s %s => '
'generated %s byte... | python | def get_log_format_default(self):
"""Returns default log message format.
.. note:: Some params may be missing.
"""
vars = self.logging.vars
format_default = (
'[pid: %s|app: %s|req: %s/%s] %s (%s) {%s vars in %s bytes} [%s] %s %s => '
'generated %s byte... | [
"def",
"get_log_format_default",
"(",
"self",
")",
":",
"vars",
"=",
"self",
".",
"logging",
".",
"vars",
"format_default",
"=",
"(",
"'[pid: %s|app: %s|req: %s/%s] %s (%s) {%s vars in %s bytes} [%s] %s %s => '",
"'generated %s bytes in %s %s%s(%s %s) %s headers in %s bytes (%s swi... | Returns default log message format.
.. note:: Some params may be missing. | [
"Returns",
"default",
"log",
"message",
"format",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/presets/nice.py#L83-L118 |
idlesign/uwsgiconf | uwsgiconf/presets/nice.py | Section.configure_owner | def configure_owner(self, owner='www-data'):
"""Shortcut to set process owner data.
:param str|unicode owner: Sets user and group. Default: ``www-data``.
"""
if owner is not None:
self.main_process.set_owner_params(uid=owner, gid=owner)
return self | python | def configure_owner(self, owner='www-data'):
"""Shortcut to set process owner data.
:param str|unicode owner: Sets user and group. Default: ``www-data``.
"""
if owner is not None:
self.main_process.set_owner_params(uid=owner, gid=owner)
return self | [
"def",
"configure_owner",
"(",
"self",
",",
"owner",
"=",
"'www-data'",
")",
":",
"if",
"owner",
"is",
"not",
"None",
":",
"self",
".",
"main_process",
".",
"set_owner_params",
"(",
"uid",
"=",
"owner",
",",
"gid",
"=",
"owner",
")",
"return",
"self"
] | Shortcut to set process owner data.
:param str|unicode owner: Sets user and group. Default: ``www-data``. | [
"Shortcut",
"to",
"set",
"process",
"owner",
"data",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/presets/nice.py#L120-L129 |
idlesign/uwsgiconf | uwsgiconf/options/alarms.py | Alarms.set_basic_params | def set_basic_params(self, msg_size=None, cheap=None, anti_loop_timeout=None):
"""
:param int msg_size: Set the max size of an alarm message in bytes. Default: 8192.
:param bool cheap: Use main alarm thread rather than create dedicated
threads for curl-based alarms
:param i... | python | def set_basic_params(self, msg_size=None, cheap=None, anti_loop_timeout=None):
"""
:param int msg_size: Set the max size of an alarm message in bytes. Default: 8192.
:param bool cheap: Use main alarm thread rather than create dedicated
threads for curl-based alarms
:param i... | [
"def",
"set_basic_params",
"(",
"self",
",",
"msg_size",
"=",
"None",
",",
"cheap",
"=",
"None",
",",
"anti_loop_timeout",
"=",
"None",
")",
":",
"self",
".",
"_set",
"(",
"'alarm-msg-size'",
",",
"msg_size",
")",
"self",
".",
"_set",
"(",
"'alarm-cheap'",... | :param int msg_size: Set the max size of an alarm message in bytes. Default: 8192.
:param bool cheap: Use main alarm thread rather than create dedicated
threads for curl-based alarms
:param int anti_loop_timeout: Tune the anti-loop alarm system. Default: 3 seconds. | [
":",
"param",
"int",
"msg_size",
":",
"Set",
"the",
"max",
"size",
"of",
"an",
"alarm",
"message",
"in",
"bytes",
".",
"Default",
":",
"8192",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/alarms.py#L32-L46 |
idlesign/uwsgiconf | uwsgiconf/options/alarms.py | Alarms.register_alarm | def register_alarm(self, alarm):
"""Register (create) an alarm.
:param AlarmType|list[AlarmType] alarm: Alarm.
"""
for alarm in listify(alarm):
if alarm not in self._alarms:
self._set('alarm', alarm, multi=True)
self._alarms.append(alarm)
... | python | def register_alarm(self, alarm):
"""Register (create) an alarm.
:param AlarmType|list[AlarmType] alarm: Alarm.
"""
for alarm in listify(alarm):
if alarm not in self._alarms:
self._set('alarm', alarm, multi=True)
self._alarms.append(alarm)
... | [
"def",
"register_alarm",
"(",
"self",
",",
"alarm",
")",
":",
"for",
"alarm",
"in",
"listify",
"(",
"alarm",
")",
":",
"if",
"alarm",
"not",
"in",
"self",
".",
"_alarms",
":",
"self",
".",
"_set",
"(",
"'alarm'",
",",
"alarm",
",",
"multi",
"=",
"T... | Register (create) an alarm.
:param AlarmType|list[AlarmType] alarm: Alarm. | [
"Register",
"(",
"create",
")",
"an",
"alarm",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/alarms.py#L55-L66 |
idlesign/uwsgiconf | uwsgiconf/options/alarms.py | Alarms.alarm_on_log | def alarm_on_log(self, alarm, matcher, skip=False):
"""Raise (or skip) the specified alarm when a log line matches the specified regexp.
:param AlarmType|list[AlarmType] alarm: Alarm.
:param str|unicode matcher: Regular expression to match log line.
:param bool skip:
"""
... | python | def alarm_on_log(self, alarm, matcher, skip=False):
"""Raise (or skip) the specified alarm when a log line matches the specified regexp.
:param AlarmType|list[AlarmType] alarm: Alarm.
:param str|unicode matcher: Regular expression to match log line.
:param bool skip:
"""
... | [
"def",
"alarm_on_log",
"(",
"self",
",",
"alarm",
",",
"matcher",
",",
"skip",
"=",
"False",
")",
":",
"self",
".",
"register_alarm",
"(",
"alarm",
")",
"value",
"=",
"'%s %s'",
"%",
"(",
"','",
".",
"join",
"(",
"map",
"(",
"attrgetter",
"(",
"'alia... | Raise (or skip) the specified alarm when a log line matches the specified regexp.
:param AlarmType|list[AlarmType] alarm: Alarm.
:param str|unicode matcher: Regular expression to match log line.
:param bool skip: | [
"Raise",
"(",
"or",
"skip",
")",
"the",
"specified",
"alarm",
"when",
"a",
"log",
"line",
"matches",
"the",
"specified",
"regexp",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/alarms.py#L68-L86 |
idlesign/uwsgiconf | uwsgiconf/options/alarms.py | Alarms.alarm_on_fd_ready | def alarm_on_fd_ready(self, alarm, fd, message, byte_count=None):
"""Triggers the alarm when the specified file descriptor is ready for read.
This is really useful for integration with the Linux eventfd() facility.
Pretty low-level and the basis of most of the alarm plugins.
* http://u... | python | def alarm_on_fd_ready(self, alarm, fd, message, byte_count=None):
"""Triggers the alarm when the specified file descriptor is ready for read.
This is really useful for integration with the Linux eventfd() facility.
Pretty low-level and the basis of most of the alarm plugins.
* http://u... | [
"def",
"alarm_on_fd_ready",
"(",
"self",
",",
"alarm",
",",
"fd",
",",
"message",
",",
"byte_count",
"=",
"None",
")",
":",
"self",
".",
"register_alarm",
"(",
"alarm",
")",
"value",
"=",
"fd",
"if",
"byte_count",
":",
"value",
"+=",
"':%s'",
"%",
"byt... | Triggers the alarm when the specified file descriptor is ready for read.
This is really useful for integration with the Linux eventfd() facility.
Pretty low-level and the basis of most of the alarm plugins.
* http://uwsgi-docs.readthedocs.io/en/latest/Changelog-1.9.7.html#alarm-fd
:pa... | [
"Triggers",
"the",
"alarm",
"when",
"the",
"specified",
"file",
"descriptor",
"is",
"ready",
"for",
"read",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/alarms.py#L88-L119 |
idlesign/uwsgiconf | uwsgiconf/options/alarms.py | Alarms.alarm_on_segfault | def alarm_on_segfault(self, alarm):
"""Raise the specified alarm when the segmentation fault handler is executed.
Sends a backtrace.
:param AlarmType|list[AlarmType] alarm: Alarm.
"""
self.register_alarm(alarm)
for alarm in listify(alarm):
self._set('alarm-... | python | def alarm_on_segfault(self, alarm):
"""Raise the specified alarm when the segmentation fault handler is executed.
Sends a backtrace.
:param AlarmType|list[AlarmType] alarm: Alarm.
"""
self.register_alarm(alarm)
for alarm in listify(alarm):
self._set('alarm-... | [
"def",
"alarm_on_segfault",
"(",
"self",
",",
"alarm",
")",
":",
"self",
".",
"register_alarm",
"(",
"alarm",
")",
"for",
"alarm",
"in",
"listify",
"(",
"alarm",
")",
":",
"self",
".",
"_set",
"(",
"'alarm-segfault'",
",",
"alarm",
".",
"alias",
",",
"... | Raise the specified alarm when the segmentation fault handler is executed.
Sends a backtrace.
:param AlarmType|list[AlarmType] alarm: Alarm. | [
"Raise",
"the",
"specified",
"alarm",
"when",
"the",
"segmentation",
"fault",
"handler",
"is",
"executed",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/alarms.py#L133-L145 |
idlesign/uwsgiconf | uwsgiconf/sysinit.py | get_config | def get_config(systype, conf, conf_path, runner=None, project_name=None):
"""Returns init system configuration file contents.
:param str|unicode systype: System type alias, e.g. systemd, upstart
:param Section|Configuration conf: Configuration/Section object.
:param str|unicode conf_path: File path to ... | python | def get_config(systype, conf, conf_path, runner=None, project_name=None):
"""Returns init system configuration file contents.
:param str|unicode systype: System type alias, e.g. systemd, upstart
:param Section|Configuration conf: Configuration/Section object.
:param str|unicode conf_path: File path to ... | [
"def",
"get_config",
"(",
"systype",
",",
"conf",
",",
"conf_path",
",",
"runner",
"=",
"None",
",",
"project_name",
"=",
"None",
")",
":",
"runner",
"=",
"runner",
"or",
"(",
"'%s run'",
"%",
"Finder",
".",
"uwsgiconf",
"(",
")",
")",
"conf_path",
"="... | Returns init system configuration file contents.
:param str|unicode systype: System type alias, e.g. systemd, upstart
:param Section|Configuration conf: Configuration/Section object.
:param str|unicode conf_path: File path to a configuration file or a command producing such a configuration.
:param str|... | [
"Returns",
"init",
"system",
"configuration",
"file",
"contents",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/sysinit.py#L120-L144 |
idlesign/uwsgiconf | demos/onefile.py | app_1 | def app_1(env, start_response):
"""This is simple WSGI application that will be served by uWSGI."""
from uwsgiconf.runtime.environ import uwsgi_env
start_response('200 OK', [('Content-Type','text/html')])
data = [
'<h1>uwsgiconf demo: one file</h1>',
'<div>uWSGI version: %s</div>' % ... | python | def app_1(env, start_response):
"""This is simple WSGI application that will be served by uWSGI."""
from uwsgiconf.runtime.environ import uwsgi_env
start_response('200 OK', [('Content-Type','text/html')])
data = [
'<h1>uwsgiconf demo: one file</h1>',
'<div>uWSGI version: %s</div>' % ... | [
"def",
"app_1",
"(",
"env",
",",
"start_response",
")",
":",
"from",
"uwsgiconf",
".",
"runtime",
".",
"environ",
"import",
"uwsgi_env",
"start_response",
"(",
"'200 OK'",
",",
"[",
"(",
"'Content-Type'",
",",
"'text/html'",
")",
"]",
")",
"data",
"=",
"["... | This is simple WSGI application that will be served by uWSGI. | [
"This",
"is",
"simple",
"WSGI",
"application",
"that",
"will",
"be",
"served",
"by",
"uWSGI",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/demos/onefile.py#L20-L34 |
idlesign/uwsgiconf | demos/onefile.py | app_2 | def app_2(env, start_response):
"""This is another simple WSGI application that will be served by uWSGI."""
import random
start_response('200 OK', [('Content-Type','text/html')])
data = [
'<h1>uwsgiconf demo: one file second app</h1>',
'<div>Some random number for you: %s</div>' % ra... | python | def app_2(env, start_response):
"""This is another simple WSGI application that will be served by uWSGI."""
import random
start_response('200 OK', [('Content-Type','text/html')])
data = [
'<h1>uwsgiconf demo: one file second app</h1>',
'<div>Some random number for you: %s</div>' % ra... | [
"def",
"app_2",
"(",
"env",
",",
"start_response",
")",
":",
"import",
"random",
"start_response",
"(",
"'200 OK'",
",",
"[",
"(",
"'Content-Type'",
",",
"'text/html'",
")",
"]",
")",
"data",
"=",
"[",
"'<h1>uwsgiconf demo: one file second app</h1>'",
",",
"'<di... | This is another simple WSGI application that will be served by uWSGI. | [
"This",
"is",
"another",
"simple",
"WSGI",
"application",
"that",
"will",
"be",
"served",
"by",
"uWSGI",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/demos/onefile.py#L37-L50 |
idlesign/uwsgiconf | demos/onefile.py | configure | def configure():
"""Configure uWSGI.
This returns several configuration objects, which will be used
to spawn several uWSGI processes.
Applications are on 127.0.0.1 on ports starting from 8000.
"""
import os
from uwsgiconf.presets.nice import PythonSection
FILE = os.path.abspath(__fil... | python | def configure():
"""Configure uWSGI.
This returns several configuration objects, which will be used
to spawn several uWSGI processes.
Applications are on 127.0.0.1 on ports starting from 8000.
"""
import os
from uwsgiconf.presets.nice import PythonSection
FILE = os.path.abspath(__fil... | [
"def",
"configure",
"(",
")",
":",
"import",
"os",
"from",
"uwsgiconf",
".",
"presets",
".",
"nice",
"import",
"PythonSection",
"FILE",
"=",
"os",
".",
"path",
".",
"abspath",
"(",
"__file__",
")",
"port",
"=",
"8000",
"configurations",
"=",
"[",
"]",
... | Configure uWSGI.
This returns several configuration objects, which will be used
to spawn several uWSGI processes.
Applications are on 127.0.0.1 on ports starting from 8000. | [
"Configure",
"uWSGI",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/demos/onefile.py#L53-L101 |
jin10086/copyheaders | copyheaders/copyheaders.py | headers_raw_to_dict | def headers_raw_to_dict(headers_raw):
r"""
Convert raw headers (single multi-line bytestring)
to a dictionary.
For example:
>>> from copyheaders import headers_raw_to_dict
>>> headers_raw_to_dict(b"Content-type: text/html\n\rAccept: gzip\n\n") # doctest: +SKIP
{'Content-type': ['text/htm... | python | def headers_raw_to_dict(headers_raw):
r"""
Convert raw headers (single multi-line bytestring)
to a dictionary.
For example:
>>> from copyheaders import headers_raw_to_dict
>>> headers_raw_to_dict(b"Content-type: text/html\n\rAccept: gzip\n\n") # doctest: +SKIP
{'Content-type': ['text/htm... | [
"def",
"headers_raw_to_dict",
"(",
"headers_raw",
")",
":",
"if",
"headers_raw",
"is",
"None",
":",
"return",
"None",
"headers",
"=",
"headers_raw",
".",
"splitlines",
"(",
")",
"headers_tuples",
"=",
"[",
"header",
".",
"split",
"(",
"b':'",
",",
"1",
")"... | r"""
Convert raw headers (single multi-line bytestring)
to a dictionary.
For example:
>>> from copyheaders import headers_raw_to_dict
>>> headers_raw_to_dict(b"Content-type: text/html\n\rAccept: gzip\n\n") # doctest: +SKIP
{'Content-type': ['text/html'], 'Accept': ['gzip']}
Incorrect in... | [
"r",
"Convert",
"raw",
"headers",
"(",
"single",
"multi",
"-",
"line",
"bytestring",
")",
"to",
"a",
"dictionary",
"."
] | train | https://github.com/jin10086/copyheaders/blob/195479ac1c8620e0490c75c5d4d768faf5dcbf8f/copyheaders/copyheaders.py#L1-L39 |
idlesign/uwsgiconf | uwsgiconf/options/logging.py | Logging.log_into | def log_into(self, target, before_priv_drop=True):
"""Simple file or UDP logging.
.. note:: This doesn't require any Logger plugin and can be used
if no log routing is required.
:param str|unicode target: Filepath or UDP address.
:param bool before_priv_drop: Whether to lo... | python | def log_into(self, target, before_priv_drop=True):
"""Simple file or UDP logging.
.. note:: This doesn't require any Logger plugin and can be used
if no log routing is required.
:param str|unicode target: Filepath or UDP address.
:param bool before_priv_drop: Whether to lo... | [
"def",
"log_into",
"(",
"self",
",",
"target",
",",
"before_priv_drop",
"=",
"True",
")",
":",
"command",
"=",
"'logto'",
"if",
"not",
"before_priv_drop",
":",
"command",
"+=",
"'2'",
"self",
".",
"_set",
"(",
"command",
",",
"target",
")",
"return",
"se... | Simple file or UDP logging.
.. note:: This doesn't require any Logger plugin and can be used
if no log routing is required.
:param str|unicode target: Filepath or UDP address.
:param bool before_priv_drop: Whether to log data before or after privileges drop. | [
"Simple",
"file",
"or",
"UDP",
"logging",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/logging.py#L108-L126 |
idlesign/uwsgiconf | uwsgiconf/options/logging.py | Logging.set_file_params | def set_file_params(
self, reopen_on_reload=None, trucate_on_statup=None, max_size=None, rotation_fname=None,
touch_reopen=None, touch_rotate=None, owner=None, mode=None):
"""Set various parameters related to file logging.
:param bool reopen_on_reload: Reopen log after reload.
... | python | def set_file_params(
self, reopen_on_reload=None, trucate_on_statup=None, max_size=None, rotation_fname=None,
touch_reopen=None, touch_rotate=None, owner=None, mode=None):
"""Set various parameters related to file logging.
:param bool reopen_on_reload: Reopen log after reload.
... | [
"def",
"set_file_params",
"(",
"self",
",",
"reopen_on_reload",
"=",
"None",
",",
"trucate_on_statup",
"=",
"None",
",",
"max_size",
"=",
"None",
",",
"rotation_fname",
"=",
"None",
",",
"touch_reopen",
"=",
"None",
",",
"touch_rotate",
"=",
"None",
",",
"ow... | Set various parameters related to file logging.
:param bool reopen_on_reload: Reopen log after reload.
:param bool trucate_on_statup: Truncate log on startup.
:param int max_size: Set maximum logfile size in bytes after which log should be rotated.
:param str|unicode rotation_fname: ... | [
"Set",
"various",
"parameters",
"related",
"to",
"file",
"logging",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/logging.py#L128-L166 |
idlesign/uwsgiconf | uwsgiconf/options/logging.py | Logging.set_filters | def set_filters(self, include=None, exclude=None, write_errors=None, write_errors_tolerance=None, sigpipe=None):
"""Set various log data filters.
:param str|unicode|list include: Show only log lines matching the specified regexp.
.. note:: Requires enabled PCRE support.
:param str... | python | def set_filters(self, include=None, exclude=None, write_errors=None, write_errors_tolerance=None, sigpipe=None):
"""Set various log data filters.
:param str|unicode|list include: Show only log lines matching the specified regexp.
.. note:: Requires enabled PCRE support.
:param str... | [
"def",
"set_filters",
"(",
"self",
",",
"include",
"=",
"None",
",",
"exclude",
"=",
"None",
",",
"write_errors",
"=",
"None",
",",
"write_errors_tolerance",
"=",
"None",
",",
"sigpipe",
"=",
"None",
")",
":",
"if",
"write_errors",
"is",
"not",
"None",
"... | Set various log data filters.
:param str|unicode|list include: Show only log lines matching the specified regexp.
.. note:: Requires enabled PCRE support.
:param str|unicode|list exclude: Do not show log lines matching the specified regexp.
.. note:: Requires enabled PCRE sup... | [
"Set",
"various",
"log",
"data",
"filters",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/logging.py#L168-L209 |
idlesign/uwsgiconf | uwsgiconf/options/logging.py | Logging.set_requests_filters | def set_requests_filters(
self, slower=None, bigger=None, status_4xx=None, status_5xx=None,
no_body=None, sendfile=None, io_errors=None):
"""Set various log data filters.
:param int slower: Log requests slower than the specified number of milliseconds.
:param int bigger... | python | def set_requests_filters(
self, slower=None, bigger=None, status_4xx=None, status_5xx=None,
no_body=None, sendfile=None, io_errors=None):
"""Set various log data filters.
:param int slower: Log requests slower than the specified number of milliseconds.
:param int bigger... | [
"def",
"set_requests_filters",
"(",
"self",
",",
"slower",
"=",
"None",
",",
"bigger",
"=",
"None",
",",
"status_4xx",
"=",
"None",
",",
"status_5xx",
"=",
"None",
",",
"no_body",
"=",
"None",
",",
"sendfile",
"=",
"None",
",",
"io_errors",
"=",
"None",
... | Set various log data filters.
:param int slower: Log requests slower than the specified number of milliseconds.
:param int bigger: Log requests bigger than the specified size in bytes.
:param status_4xx: Log requests with a 4xx response.
:param status_5xx: Log requests with a 5xx res... | [
"Set",
"various",
"log",
"data",
"filters",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/logging.py#L211-L239 |
idlesign/uwsgiconf | uwsgiconf/options/logging.py | Logging.set_master_logging_params | def set_master_logging_params(
self, enable=None, dedicate_thread=None, buffer=None,
sock_stream=None, sock_stream_requests_only=None):
"""Sets logging params for delegating logging to master process.
:param bool enable: Delegate logging to master process.
Delegate t... | python | def set_master_logging_params(
self, enable=None, dedicate_thread=None, buffer=None,
sock_stream=None, sock_stream_requests_only=None):
"""Sets logging params for delegating logging to master process.
:param bool enable: Delegate logging to master process.
Delegate t... | [
"def",
"set_master_logging_params",
"(",
"self",
",",
"enable",
"=",
"None",
",",
"dedicate_thread",
"=",
"None",
",",
"buffer",
"=",
"None",
",",
"sock_stream",
"=",
"None",
",",
"sock_stream_requests_only",
"=",
"None",
")",
":",
"self",
".",
"_set",
"(",
... | Sets logging params for delegating logging to master process.
:param bool enable: Delegate logging to master process.
Delegate the write of the logs to the master process
(this will put all of the logging I/O to a single process).
Useful for system with advanced I/O schedule... | [
"Sets",
"logging",
"params",
"for",
"delegating",
"logging",
"to",
"master",
"process",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/logging.py#L241-L274 |
idlesign/uwsgiconf | uwsgiconf/options/logging.py | Logging.add_logger | def add_logger(self, logger, requests_only=False, for_single_worker=False):
"""Set/add a common logger or a request requests only.
:param str|unicode|list|Logger|list[Logger] logger:
:param bool requests_only: Logger used only for requests information messages.
:param bool for_single_... | python | def add_logger(self, logger, requests_only=False, for_single_worker=False):
"""Set/add a common logger or a request requests only.
:param str|unicode|list|Logger|list[Logger] logger:
:param bool requests_only: Logger used only for requests information messages.
:param bool for_single_... | [
"def",
"add_logger",
"(",
"self",
",",
"logger",
",",
"requests_only",
"=",
"False",
",",
"for_single_worker",
"=",
"False",
")",
":",
"if",
"for_single_worker",
":",
"command",
"=",
"'worker-logger-req'",
"if",
"requests_only",
"else",
"'worker-logger'",
"else",
... | Set/add a common logger or a request requests only.
:param str|unicode|list|Logger|list[Logger] logger:
:param bool requests_only: Logger used only for requests information messages.
:param bool for_single_worker: Logger to be used in single-worker setup. | [
"Set",
"/",
"add",
"a",
"common",
"logger",
"or",
"a",
"request",
"requests",
"only",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/logging.py#L283-L302 |
idlesign/uwsgiconf | uwsgiconf/options/logging.py | Logging.add_logger_route | def add_logger_route(self, logger, matcher, requests_only=False):
"""Log to the specified named logger if regexp applied on log item matches.
:param str|unicode|list|Logger|list[Logger] logger: Logger to associate route with.
:param str|unicode matcher: Regular expression to apply to log item.... | python | def add_logger_route(self, logger, matcher, requests_only=False):
"""Log to the specified named logger if regexp applied on log item matches.
:param str|unicode|list|Logger|list[Logger] logger: Logger to associate route with.
:param str|unicode matcher: Regular expression to apply to log item.... | [
"def",
"add_logger_route",
"(",
"self",
",",
"logger",
",",
"matcher",
",",
"requests_only",
"=",
"False",
")",
":",
"command",
"=",
"'log-req-route'",
"if",
"requests_only",
"else",
"'log-route'",
"for",
"logger",
"in",
"listify",
"(",
"logger",
")",
":",
"... | Log to the specified named logger if regexp applied on log item matches.
:param str|unicode|list|Logger|list[Logger] logger: Logger to associate route with.
:param str|unicode matcher: Regular expression to apply to log item.
:param bool requests_only: Matching should be used only for request... | [
"Log",
"to",
"the",
"specified",
"named",
"logger",
"if",
"regexp",
"applied",
"on",
"log",
"item",
"matches",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/logging.py#L304-L319 |
idlesign/uwsgiconf | uwsgiconf/options/logging.py | Logging.add_logger_encoder | def add_logger_encoder(self, encoder, logger=None, requests_only=False, for_single_worker=False):
"""Add an item in the log encoder or request encoder chain.
* http://uwsgi-docs.readthedocs.io/en/latest/LogEncoders.html
.. note:: Encoders automatically enable master log handling (see ``.se... | python | def add_logger_encoder(self, encoder, logger=None, requests_only=False, for_single_worker=False):
"""Add an item in the log encoder or request encoder chain.
* http://uwsgi-docs.readthedocs.io/en/latest/LogEncoders.html
.. note:: Encoders automatically enable master log handling (see ``.se... | [
"def",
"add_logger_encoder",
"(",
"self",
",",
"encoder",
",",
"logger",
"=",
"None",
",",
"requests_only",
"=",
"False",
",",
"for_single_worker",
"=",
"False",
")",
":",
"if",
"for_single_worker",
":",
"command",
"=",
"'worker-log-req-encoder'",
"if",
"request... | Add an item in the log encoder or request encoder chain.
* http://uwsgi-docs.readthedocs.io/en/latest/LogEncoders.html
.. note:: Encoders automatically enable master log handling (see ``.set_master_logging_params()``).
.. note:: For best performance consider allocating a thread
... | [
"Add",
"an",
"item",
"in",
"the",
"log",
"encoder",
"or",
"request",
"encoder",
"chain",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/logging.py#L321-L357 |
theacodes/cmarkgfm | src/cmarkgfm/build_cmark.py | _compiler_type | def _compiler_type():
"""
Gets the compiler type from distutils. On Windows with MSVC it will be
"msvc". On macOS and linux it is "unix".
Borrowed from https://github.com/pyca/cryptography/blob\
/05b34433fccdc2fec0bb014c3668068169d769fd/src/_cffi_src/utils.py#L78
"""
dist = dist... | python | def _compiler_type():
"""
Gets the compiler type from distutils. On Windows with MSVC it will be
"msvc". On macOS and linux it is "unix".
Borrowed from https://github.com/pyca/cryptography/blob\
/05b34433fccdc2fec0bb014c3668068169d769fd/src/_cffi_src/utils.py#L78
"""
dist = dist... | [
"def",
"_compiler_type",
"(",
")",
":",
"dist",
"=",
"distutils",
".",
"dist",
".",
"Distribution",
"(",
")",
"dist",
".",
"parse_config_files",
"(",
")",
"cmd",
"=",
"dist",
".",
"get_command_obj",
"(",
"'build'",
")",
"cmd",
".",
"ensure_finalized",
"(",... | Gets the compiler type from distutils. On Windows with MSVC it will be
"msvc". On macOS and linux it is "unix".
Borrowed from https://github.com/pyca/cryptography/blob\
/05b34433fccdc2fec0bb014c3668068169d769fd/src/_cffi_src/utils.py#L78 | [
"Gets",
"the",
"compiler",
"type",
"from",
"distutils",
".",
"On",
"Windows",
"with",
"MSVC",
"it",
"will",
"be",
"msvc",
".",
"On",
"macOS",
"and",
"linux",
"it",
"is",
"unix",
".",
"Borrowed",
"from",
"https",
":",
"//",
"github",
".",
"com",
"/",
... | train | https://github.com/theacodes/cmarkgfm/blob/742cc59c7dadbee3c1f54b86167840bd0d3f2d49/src/cmarkgfm/build_cmark.py#L41-L54 |
idlesign/uwsgiconf | uwsgiconf/options/monitoring.py | Monitoring.set_metrics_params | def set_metrics_params(self, enable=None, store_dir=None, restore=None, no_cores=None):
"""Sets basic Metrics subsystem params.
uWSGI metrics subsystem allows you to manage "numbers" from your apps.
When enabled, the subsystem configures a vast amount of metrics
(like requests per-core... | python | def set_metrics_params(self, enable=None, store_dir=None, restore=None, no_cores=None):
"""Sets basic Metrics subsystem params.
uWSGI metrics subsystem allows you to manage "numbers" from your apps.
When enabled, the subsystem configures a vast amount of metrics
(like requests per-core... | [
"def",
"set_metrics_params",
"(",
"self",
",",
"enable",
"=",
"None",
",",
"store_dir",
"=",
"None",
",",
"restore",
"=",
"None",
",",
"no_cores",
"=",
"None",
")",
":",
"self",
".",
"_set",
"(",
"'enable-metrics'",
",",
"enable",
",",
"cast",
"=",
"bo... | Sets basic Metrics subsystem params.
uWSGI metrics subsystem allows you to manage "numbers" from your apps.
When enabled, the subsystem configures a vast amount of metrics
(like requests per-core, memory usage, etc) but, in addition to this,
you can configure your own metrics, such as ... | [
"Sets",
"basic",
"Metrics",
"subsystem",
"params",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/monitoring.py#L93-L129 |
idlesign/uwsgiconf | uwsgiconf/options/monitoring.py | Monitoring.set_metrics_threshold | def set_metrics_threshold(self, name, value, check_interval=None, reset_to=None, alarm=None, alarm_message=None):
"""Sets metric threshold parameters.
:param str|unicode name: Metric name.
:param int value: Threshold value.
:param int reset_to: Reset value to when threshold is reached... | python | def set_metrics_threshold(self, name, value, check_interval=None, reset_to=None, alarm=None, alarm_message=None):
"""Sets metric threshold parameters.
:param str|unicode name: Metric name.
:param int value: Threshold value.
:param int reset_to: Reset value to when threshold is reached... | [
"def",
"set_metrics_threshold",
"(",
"self",
",",
"name",
",",
"value",
",",
"check_interval",
"=",
"None",
",",
"reset_to",
"=",
"None",
",",
"alarm",
"=",
"None",
",",
"alarm_message",
"=",
"None",
")",
":",
"if",
"alarm",
"is",
"not",
"None",
"and",
... | Sets metric threshold parameters.
:param str|unicode name: Metric name.
:param int value: Threshold value.
:param int reset_to: Reset value to when threshold is reached.
:param int check_interval: Threshold check interval in seconds.
:param str|unicode|AlarmType alarm: Alarm... | [
"Sets",
"metric",
"threshold",
"parameters",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/monitoring.py#L131-L163 |
idlesign/uwsgiconf | uwsgiconf/options/monitoring.py | Monitoring.set_stats_params | def set_stats_params(
self, address=None, enable_http=None,
minify=None, no_cores=None, no_metrics=None, push_interval=None):
"""Enables stats server on the specified address.
* http://uwsgi.readthedocs.io/en/latest/StatsServer.html
:param str|unicode address: Address/s... | python | def set_stats_params(
self, address=None, enable_http=None,
minify=None, no_cores=None, no_metrics=None, push_interval=None):
"""Enables stats server on the specified address.
* http://uwsgi.readthedocs.io/en/latest/StatsServer.html
:param str|unicode address: Address/s... | [
"def",
"set_stats_params",
"(",
"self",
",",
"address",
"=",
"None",
",",
"enable_http",
"=",
"None",
",",
"minify",
"=",
"None",
",",
"no_cores",
"=",
"None",
",",
"no_metrics",
"=",
"None",
",",
"push_interval",
"=",
"None",
")",
":",
"self",
".",
"_... | Enables stats server on the specified address.
* http://uwsgi.readthedocs.io/en/latest/StatsServer.html
:param str|unicode address: Address/socket to make stats available on.
Examples:
* 127.0.0.1:1717
* /tmp/statsock
* :5050
:param... | [
"Enables",
"stats",
"server",
"on",
"the",
"specified",
"address",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/monitoring.py#L165-L198 |
idlesign/uwsgiconf | uwsgiconf/options/monitoring.py | Monitoring.register_stats_pusher | def register_stats_pusher(self, pusher):
"""Registers a pusher to be used for pushing statistics to various remotes/locals.
:param Pusher|list[Pusher] pusher:
"""
for pusher in listify(pusher):
self._set('stats-push', pusher, multi=True)
return self._section | python | def register_stats_pusher(self, pusher):
"""Registers a pusher to be used for pushing statistics to various remotes/locals.
:param Pusher|list[Pusher] pusher:
"""
for pusher in listify(pusher):
self._set('stats-push', pusher, multi=True)
return self._section | [
"def",
"register_stats_pusher",
"(",
"self",
",",
"pusher",
")",
":",
"for",
"pusher",
"in",
"listify",
"(",
"pusher",
")",
":",
"self",
".",
"_set",
"(",
"'stats-push'",
",",
"pusher",
",",
"multi",
"=",
"True",
")",
"return",
"self",
".",
"_section"
] | Registers a pusher to be used for pushing statistics to various remotes/locals.
:param Pusher|list[Pusher] pusher: | [
"Registers",
"a",
"pusher",
"to",
"be",
"used",
"for",
"pushing",
"statistics",
"to",
"various",
"remotes",
"/",
"locals",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/monitoring.py#L200-L209 |
idlesign/uwsgiconf | uwsgiconf/options/monitoring.py | Monitoring.enable_snmp | def enable_snmp(self, address, community_string):
"""Enables SNMP.
uWSGI server embeds a tiny SNMP server that you can use to integrate
your web apps with your monitoring infrastructure.
* http://uwsgi.readthedocs.io/en/latest/SNMP.html
.. note:: SNMP server is started in the ... | python | def enable_snmp(self, address, community_string):
"""Enables SNMP.
uWSGI server embeds a tiny SNMP server that you can use to integrate
your web apps with your monitoring infrastructure.
* http://uwsgi.readthedocs.io/en/latest/SNMP.html
.. note:: SNMP server is started in the ... | [
"def",
"enable_snmp",
"(",
"self",
",",
"address",
",",
"community_string",
")",
":",
"self",
".",
"_set",
"(",
"'snmp'",
",",
"address",
")",
"self",
".",
"_set",
"(",
"'snmp-community'",
",",
"community_string",
")",
"return",
"self",
".",
"_section"
] | Enables SNMP.
uWSGI server embeds a tiny SNMP server that you can use to integrate
your web apps with your monitoring infrastructure.
* http://uwsgi.readthedocs.io/en/latest/SNMP.html
.. note:: SNMP server is started in the master process after dropping the privileges.
If ... | [
"Enables",
"SNMP",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/monitoring.py#L211-L235 |
idlesign/uwsgiconf | uwsgiconf/options/applications.py | Applications.mount | def mount(self, mountpoint, app, into_worker=False):
"""Load application under mountpoint.
Example:
* .mount('', 'app0.py') -- Root URL part
* .mount('/app1', 'app1.py') -- URL part
* .mount('/pinax/here', '/var/www/pinax/deploy/pinax.wsgi')
* .mount('the... | python | def mount(self, mountpoint, app, into_worker=False):
"""Load application under mountpoint.
Example:
* .mount('', 'app0.py') -- Root URL part
* .mount('/app1', 'app1.py') -- URL part
* .mount('/pinax/here', '/var/www/pinax/deploy/pinax.wsgi')
* .mount('the... | [
"def",
"mount",
"(",
"self",
",",
"mountpoint",
",",
"app",
",",
"into_worker",
"=",
"False",
")",
":",
"# todo check worker mount -- uwsgi_init_worker_mount_app() expects worker://",
"self",
".",
"_set",
"(",
"'worker-mount'",
"if",
"into_worker",
"else",
"'mount'",
... | Load application under mountpoint.
Example:
* .mount('', 'app0.py') -- Root URL part
* .mount('/app1', 'app1.py') -- URL part
* .mount('/pinax/here', '/var/www/pinax/deploy/pinax.wsgi')
* .mount('the_app3', 'app3.py') -- Variable value: application alias (can be... | [
"Load",
"application",
"under",
"mountpoint",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/applications.py#L40-L68 |
idlesign/uwsgiconf | uwsgiconf/options/applications.py | Applications.switch_into_lazy_mode | def switch_into_lazy_mode(self, affect_master=None):
"""Load apps in workers instead of master.
This option may have memory usage implications
as Copy-on-Write semantics can not be used.
.. note:: Consider using ``touch_chain_reload`` option in ``workers`` basic params
for ... | python | def switch_into_lazy_mode(self, affect_master=None):
"""Load apps in workers instead of master.
This option may have memory usage implications
as Copy-on-Write semantics can not be used.
.. note:: Consider using ``touch_chain_reload`` option in ``workers`` basic params
for ... | [
"def",
"switch_into_lazy_mode",
"(",
"self",
",",
"affect_master",
"=",
"None",
")",
":",
"self",
".",
"_set",
"(",
"'lazy'",
"if",
"affect_master",
"else",
"'lazy-apps'",
",",
"True",
",",
"cast",
"=",
"bool",
")",
"return",
"self",
".",
"_section"
] | Load apps in workers instead of master.
This option may have memory usage implications
as Copy-on-Write semantics can not be used.
.. note:: Consider using ``touch_chain_reload`` option in ``workers`` basic params
for lazy apps reloading.
:param bool affect_master: If **Tr... | [
"Load",
"apps",
"in",
"workers",
"instead",
"of",
"master",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/applications.py#L70-L88 |
idlesign/uwsgiconf | uwsgiconf/options/routing_routers.py | RouterHttp.set_basic_params | def set_basic_params(
self, workers=None, zerg_server=None, fallback_node=None, concurrent_events=None,
cheap_mode=None, stats_server=None, quiet=None, buffer_size=None,
keepalive=None, resubscribe_addresses=None):
"""
:param int workers: Number of worker processes to... | python | def set_basic_params(
self, workers=None, zerg_server=None, fallback_node=None, concurrent_events=None,
cheap_mode=None, stats_server=None, quiet=None, buffer_size=None,
keepalive=None, resubscribe_addresses=None):
"""
:param int workers: Number of worker processes to... | [
"def",
"set_basic_params",
"(",
"self",
",",
"workers",
"=",
"None",
",",
"zerg_server",
"=",
"None",
",",
"fallback_node",
"=",
"None",
",",
"concurrent_events",
"=",
"None",
",",
"cheap_mode",
"=",
"None",
",",
"stats_server",
"=",
"None",
",",
"quiet",
... | :param int workers: Number of worker processes to spawn.
:param str|unicode zerg_server: Attach the router to a zerg server.
:param str|unicode fallback_node: Fallback to the specified node in case of error.
:param int concurrent_events: Set the maximum number of concurrent events router can ... | [
":",
"param",
"int",
"workers",
":",
"Number",
"of",
"worker",
"processes",
"to",
"spawn",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/routing_routers.py#L319-L364 |
idlesign/uwsgiconf | uwsgiconf/options/routing_routers.py | RouterHttp.set_connections_params | def set_connections_params(
self, harakiri=None, timeout_socket=None, retry_delay=None, timeout_headers=None, timeout_backend=None):
"""Sets connection-related parameters.
:param int harakiri: Set gateway harakiri timeout (seconds).
:param int timeout_socket: Node socket timeout (s... | python | def set_connections_params(
self, harakiri=None, timeout_socket=None, retry_delay=None, timeout_headers=None, timeout_backend=None):
"""Sets connection-related parameters.
:param int harakiri: Set gateway harakiri timeout (seconds).
:param int timeout_socket: Node socket timeout (s... | [
"def",
"set_connections_params",
"(",
"self",
",",
"harakiri",
"=",
"None",
",",
"timeout_socket",
"=",
"None",
",",
"retry_delay",
"=",
"None",
",",
"timeout_headers",
"=",
"None",
",",
"timeout_backend",
"=",
"None",
")",
":",
"super",
"(",
"RouterHttp",
"... | Sets connection-related parameters.
:param int harakiri: Set gateway harakiri timeout (seconds).
:param int timeout_socket: Node socket timeout (seconds).
Used to set the SPDY timeout. This is the maximum amount of inactivity after
the SPDY connection is closed.
De... | [
"Sets",
"connection",
"-",
"related",
"parameters",
"."
] | train | https://github.com/idlesign/uwsgiconf/blob/475407acb44199edbf7e0a66261bfeb51de1afae/uwsgiconf/options/routing_routers.py#L366-L397 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.