how to create uwsgi mulefunc handler?

The uwsgi documentation states that adding uwsgidecorators.mulefunc decorator to any function will offload function call to mule.
The default mule(without a brain) does not execute actual function and just show messages like this:

*** mule 1 received a 97 bytes message ***

However digging into the code shows that there is a uwsgi.mule_msg_hook function which is for handling offloaded calls(BTW nothing in documentation about mule_msg_hook).
And by giving a simple brain to mule like this:

while True:

Will solve the problem.

But there is one place in source code of uwsgi( file plugins/python/python_plugin.c ) where mule_msg_hook is called. So I’m guessing that there exists another way to handle mulefuncs without using non-documented funcitons, is it?

Source: python

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.