> Hello,
>
> I need to defer a function call by a fixed amount of time. With the uwsgi
> python
> module I think i have at least a couple of options:
> - the spooler with the at parameter
> - timers and uwsgi signals
>
> I've implemented them with the spooler and it works fine, though there's
> quite a
> bit of overhead and jitter (wrt spooler frequency).
>
> The problem with the uwsgi timers is that they don't support a payload
> parameter
> but just a static payload i can define when registering the signal.
>
> Do you see any other option to do deferred work with uwsgi?
>
> I know it can be done easily using an external daemon like redis but we're
> trying to leverage uwsgi if possible, even if probably am trying to use an
> hammer for a screw :)
>
> thanks in advance
>
>

I think your best bet is the spooler with the 'at' parameter.

If jittering is a problem try setting --spooler-frequency to 1 and check
this ticket: https://github.com/unbit/uwsgi/issues/904

it could help in reducing load and ram usage when there are no tasks
enqueued.

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

Reply via email to