The uWSGI server automagically adds a uwsgi module into your Python apps.
This is useful for configuring the uWSGI server, use its internal functions and get statistics (as well as detecting whether you’re actually running under uWSGI).
Note
Many of these functions are currently woefully undocumented.
The number of processes/workers currently running.
The current configured buffer size in bytes.
The Unix timestamp of uWSGI’s startup.
This is the dictionary used to define FastFuncs.
This is the list of applications currently configured.
This is the dynamic applications dictionary.
See also
The callable to run when the uWSGI server receives a marshalled message.
The magic table of configuration placeholders.
The current configuration options, including any custom placeholders.
Get a value from the cache.
Parameters: |
|
---|
Set a value in the cache.
Parameters: |
|
---|
Delete the given cached value from the cache.
Parameters: |
|
---|
Quickly check whether there is a value in the cache associated with the given key.
Parameters: |
|
---|
Parameters: | str – The string containing the new community value. |
---|
Sets the SNMP community string.
Parameters: |
|
---|
Sets the counter or gauge to a specific value.
Parameters: |
|
---|
Increases or decreases the counter or gauge by a specific amount.
Note
uWSGI OID tree starts at 1.3.6.1.4.1.35156.17
Parameters: |
|
---|
Send data to the The uWSGI Spooler. Also known as spool().
Note
Any of the keyword arguments may also be passed in the message dictionary. This means they’re reserved words, in a way...
Set how often the spooler runs.
Send a generic message using The uwsgi Protocol.
Note
Until version 2f970ce58543278c851ff30e52758fd6d6e69fdc this function was called send_uwsgi_message().
Send a generic message to multiple recipients using The uwsgi Protocol.
Note
Until version 2f970ce58543278c851ff30e52758fd6d6e69fdc this function was called send_multi_uwsgi_message().
See also
Clustering for examples
Gracefully reload the uWSGI server stack.
See also
Reload
Get a statistics dictionary of all the workers for the current server. A dictionary is returned.
Return the process identifier (PID) of the uWSGI master process.
Returns the total number of requests managed so far by the pool of uWSGI workers.
Also available as getoption().
Also available as setoption().
Parameters: | locknum – The lock number to lock. Lock 0 is always available. |
---|
Parameters: | locknum – The lock number to unlock. Lock 0 is always available. |
---|
Parameters: |
|
---|
Parameters: | num – the signal number to raise |
---|
Block the process/thread/async core until a signal is received. Use signal_received to get the number of the signal received. If a registered handler handles a signal, signal_wait will be interrupted and the actual handler will handle the signal.
Parameters: | signum – Optional - the signal to wait for |
---|
Get the number of the last signal received. Used in conjunction with signal_wait.
Parameters: |
|
---|
Add an user-space (red-black tree backed) timer.
Parameters: |
|
---|
For the time parameters, you may use the syntax -n to denote “every n”. For instance hour=-2 would declare the signal to be sent every other hour.
Parameters: |
|
---|
Parameters: | string – The symbol name to extract. |
---|
Extracts a symbol from the uWSGI binary image.
See also
Parameters: |
|
---|
Send a message to a mule.
Returns: | A mule message, once one is received. |
---|
Block until a mule message is received and return it. This can be called from multiple threads in the same programmed mule.
Suspend handling the current request for seconds seconds and pass control to the next async core.
Parameters: | seconds – Sleep time, in seconds. |
---|
Suspend handling the current request and pass control to the next async core clamoring for attention.
Suspend handling the current request until there is something to be read on file descriptor fd. May be called several times before yielding/suspending to add more file descriptors to the set to be watched.
Parameters: |
|
---|
Suspend handling the current request until there is nothing more to be written on file descriptor fd. May be called several times to add more file descriptors to the set to be watched.
Parameters: |
|
---|