2462 Commits

Author SHA1 Message Date
Dimitri John Ledkov a6005624af paste_loader: allow specifying alternative section name to load. 2015-10-09 15:53:52 +01:00
Darvame Hleran df0c2ca1c8 lua_plugin: cache numbers set/update support 2015-09-29 13:26:48 +03:00
Hleran da60423252 lua_plugin: cache_num, proper error type
- cache_num
and also swiched to wrong type for error status (tested with proper one, than ... "oh wait, we have empty 'i' variable!", later ... "oh sh size_t is uint!")
2015-09-29 00:31:24 +03:00
Hleran 5b9e2b5f39 lua_plugin: counting sid from 1
lua does not like count from 0
2015-09-23 17:07:04 +03:00
Hleran 8185b97030 lua_plugin: protected and unprotected __tostring
- protected and unprotected __tostring (protected outside, unprotected internal, avoid double pcall)
- also check userdata for metafields (non simple type)
- mywid and mysid are functions now
- minor api bump
2015-09-23 14:21:39 +03:00
Hleran 52ea02acad Fix 1039: lua_plugin queue segfault
lua stack iterator is not suitable for c arrays
2015-09-16 12:22:25 +03:00
unbit 59a76bb85c Merge pull request #999 from Darvame/patch-5
lua_plugin: new stuff
2015-09-15 07:38:11 +02:00
Hleran 7e601d6d8d lua_plugin: cache_exists_multi, no false pls
return nil instead of false
2015-09-13 07:01:12 +03:00
Hleran c2e83fe01d lua_plugin: last
fixes, fixes, removing unnecessary stuff
2015-09-13 06:24:26 +03:00
Unbit 33df0dbcc9 attempt to fix #1034 2015-09-10 09:35:53 +02:00
Hleran 637ead553a lua_plugin: mule: posible segfault, chunked_read
websocket_send __tostring metatable
2015-09-04 01:55:34 +03:00
Hleran 5ebc399cce lua_plugin: better mules 2015-09-03 00:45:51 +03:00
Unbit e55ac57e07 fixed #1026 2015-09-01 22:25:21 +02:00
Hleran f03f679a5c lua_plugin: mules, cache som fixes 2015-08-31 21:49:13 +03:00
Hleran 72ae69090a lua_plugin: cache_get, cache_get_tmulti
cache_get, cache_get_tmulti
returns key-value table
2015-08-30 02:01:59 +03:00
Hleran 1d595be2d9 lua_plugin: cleanup, more queues, more cache
and loop of nested tables inside headers
2015-08-27 23:15:29 +03:00
Borys Pierov 637952d048 Pass LIBDIR to linker in python plugin
To make it compile properly when LD_RUN_PATH is ignored.
2015-08-26 19:18:21 -04:00
Hleran a7181572e6 lua_plugin: queues, extend wsapi
dunno why so many additions and deletions
basic queues, remove cache_set_tables (cache_set will do it now)
extend wsapi with 4th argument without breaking it
2015-08-26 19:36:59 +03:00
Marek Wiewiorski 72647fada7 Place check before the lock, and goto to the end of the while block. Instead of strstr use uwsgi_starts_with. 2015-08-25 17:57:57 +02:00
Marek Wiewiorski 82a011e14d Add no-workers option to statsd plugin 2015-08-25 15:58:15 +02:00
Hleran 94ccb6b030 lua_plugin: mules
separate api, mules
2015-08-22 18:42:41 +03:00
Hleran 01d3133fce lua_plugin: remove atexit, fixes
don't spawn lua_states on workers, if nothing to run
cache multi_set,update,del also returns number of bad keys
remove atexit, does not work as expected
2015-08-21 18:29:04 +03:00
Hleran 377fc2d863 lua_plugin: metric, cache, fixes, cleanups 2015-08-21 01:25:12 +03:00
Hleran 8d2465db9b lua_plugin: lua_createtable, signals
using prehashed lua_createtable when we can instead of lua_newtable
plugin specific regsiter signal
add_file_monitor, add_timer, add_rb_timer, add_cron, alarm
2015-08-16 15:41:39 +03:00
Hector Martin 7cf499127f rados plugin: Add username parameter 2015-08-12 22:22:42 +09:00
Hleran 6921e8f820 lua_plugin: atexit, lazy signal routing
uwsgi_lua_atexit to commit garbage-collection metamethods
lazy signal routing: empty 'receiver' value on master table
2015-08-07 07:36:13 +03:00
Hleran 37971671cb lua_plugin: own signal ref table in each lua_State 2015-08-07 02:39:44 +03:00
Hleran 271c6aa13b lua_plugin: rpc via uwsgi.rpc_ref table 2015-08-06 19:40:52 +03:00
Hleran c375920c63 lua_plugin: proper uwsgi.log
uwsgi.log like buildin print function
dummy response cfunction
2015-08-06 05:17:20 +03:00
Hleran 8e28051d2e lua_plugin: metatable.__tostring
also can yield and send metatable with __tostring attr;
some cleanups and optimizations;
2015-08-05 23:58:22 +03:00
Riccardo Magliocchetti 9787f6882c systemd_logger: fix build with recent systemd
Since systemd 209 all the functionalities of libsystemd-* have
been merged in libsystemd.
2015-08-04 11:13:32 +02:00
unbit 194f0bf94a Merge pull request #981 from Darvame/patch-4
lua_plugin: --lazy-apps, --threads and other
2015-08-02 08:11:29 +02:00
unbit b68a9d4d04 Merge pull request #986 from yueyoum/gevent-websocket
Allow call uwsgi websocket API in other greenlet. (enhanced)
2015-08-02 08:08:18 +02:00
Hleran f3bc21cf2b lua_plugin: no switch in 1st yield; async_id_get()
If coroutine and async, do not switch until first yield of coroutine;
uwsgi.async_id_get() to get 'wsgi_req->async_id' in my app;
2015-07-31 01:03:40 +03:00
Hleran a0dc7fdcf9 lua_plugin: wsapi func ref is constant, threading
correct multithreading support
2015-07-28 19:08:24 +03:00
Hleran 1e97a5e8d0 lua_plugin: malloc oversize 2015-07-28 13:04:11 +03:00
Riccardo Magliocchetti 05748c2344 plugins/libffi: fix allocation mismatch
args_type is of type ffi_type** so its memory should be sized
against sizeof(ffy_type*).

Reported by Coverity as CID #1308300
2015-07-28 11:53:13 +02:00
Hleran 4c152b237f lua_plugin: recheck async_status, clean threads
recheck async_status before pcall
keep our thread's stacks empty
2015-07-28 11:24:55 +03:00
yueyoum 1bd624b188 Change uwsgi.input_object() to uwsgi.request_context().
and change the `uwsgi.websocket_send/send_binary/recv/recv_nb`
keyword argument from `uwsgi_input` to `request_context`
2015-07-28 15:11:45 +08:00
yueyoum 41c02ad01a check argument: uwsgi_input 2015-07-28 14:21:59 +08:00
Hleran 97304aded8 lua_plugin: better lazy check 2015-07-27 23:51:43 +03:00
yueyoum 8569450a85 I add this feature for using uwsgi websocket with gevent more easy and
convenient.

Example: tests/websockets_chat_2.py

Add:    add a new API `uwsgi.input_object()` for get `struct wsgi_req *`
in python.

Modify: `uwsgi.websocket_send/send_binary/recv/recv_nb` now has a
kwarg: `uwsgi_input`.

If not provide the `uwsgi_input` keyword argument, The four function's
behavior not changed.

When provide the `uwsgi_input` keyword argument, The four function will
get `wsgi_req` from the argument.

In this way, uwsgi websocket functions can be used in other greenlets.
2015-07-28 03:18:09 +08:00
Hleran fc088d4071 lua_plugin: .post_fork to .init_apps and lazy-apps
yes,  lazy-apps and lazy works fine
2015-07-27 19:51:46 +03:00
Hleran 916924c255 lua_plugin: change default gc mode etc...
- lua gc default is now LUA_GCSTEP instead of LUA_GCCOLLECT, the default value of gc-freq 0 with full collection after each request is really overkill. LUA_GCSTEP with default gc-freq works better. But you can always change gc to full collect via 'lua-gc-full = 1' opt;

- if our coroutine yields unexpected nil while in async mode, we retry the coroutine's call again in order to detect dead coroutine without async switch

- and some cleanup
2015-07-27 13:56:29 +03:00
Hleran cfaeb00a09 lua_plugin: .init_apps to .post_fork
trying to avoid seg_fault on very heavy load; (our workers now alloc memory for states and create it)
also our app can now work without wsapi app, it will just send 500 error code
2015-07-26 00:14:43 +03:00
Riccardo Magliocchetti 0cfec33943 plugins/router_spnego: remove dead code
negotiate is always null when going through forbidden label.

Reported by Coverity as CID #1308280
2015-07-23 16:44:50 +02:00
Riccardo Magliocchetti afedff7589 plugins/webdav: fix memory leak
Reported by Coverity as CID #1308292
2015-07-23 16:44:50 +02:00
Riccardo Magliocchetti ab7caae665 plugins/emperor_amqp: fix memory leak on error path
Reported by Coverity as CID #1308293
2015-07-23 16:44:50 +02:00
Riccardo Magliocchetti af613082c0 plugins/router_radius: fix resource leak on error path
Reported by Coverity as CID #1308294
2015-07-23 16:44:50 +02:00
Riccardo Magliocchetti 1362dcb117 dumbloop: fix memory leak
Reported by Coverity as CID #1308298
2015-07-23 14:47:30 +02:00