Il giorno 06/lug/2011, alle ore 17.01, Łukasz Wróblewski ha scritto:

> ----- Oryginalna wiadomość -----
>> Od: "Roberto De Ioris" <[email protected]>
>> Do: "uWSGI developers and users list" <[email protected]>
>> Wysłane: wtorek, 5 lipiec 2011 15:01:32
>> Temat: Re: [uWSGI] spooler
>> 
>> The buffer is now maxed (with dynamic allocation) and a new special
>> arg
>> has been added to the spooler.
>> 
>> If you add body=XXX the content will be appended to the uwsgi file
>> and
>> passed as 'body' arg in the callable.
>> 
>> Check the big_body_task function in the decoratortest.py example
>> 
>> http://projects.unbit.it/uwsgi/browser/decoratortest.py
>> 
>> You can obviously put pickle data as body.
>> 
> 
> 
> Decorators are cool, but for now I'm trying to do without them.
> uWSGI 0.9.8.2-dev-1285 (32bit)
> Python 3.2
> 
> action = 'sendmail'
> priority = 1
> body = b'very large POST'
> uwsgi.send_to_spooler(action=action.encode(), priority=priority, body=body)
> 
> I get an exception:
> ValueError: spooler callable dictionary must contains only strings
> 
> 
> Confidently assert is not prepared to Py3.2
> So I changed to:
> 
> uwsgi.send_to_spooler({b'action':action.encode()}, priority=priority, 
> body=body)
> 
> The command is finished successfully, but nowhere see the Body.
> spoolfile does not contain it.
> 
> ?
> 

Should be fixed in latest tip.

Decorators (tests included) currently does not work in python 3
--
Roberto De Ioris
http://unbit.it

_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to