Hi Colas,

In order to get Celery to not reuse an existing python instance you just
have to set the following celery setting to 1:

celery.conf.CELERYD_MAX_TASKS_PER_CHILD = 1

By setting that it tells Celery to only ever run a single task in a child
before shutting that child down.  It may impact performance, but I wanted
to ensure the environment was always clean and set to the correct project
context.

Hopefully that makes sense!  If you need more details just ask.

Best,



On Mon, Jun 2, 2014 at 12:59 AM, Colas Fiszman <[email protected]>
wrote:

>
> I've also configured celery in such a way that each time a worker picks up
>> work a fresh python instance is started and sets it's context to the same
>> project context that the call was originally invoked from.
>>
>
> Hi Tony,
> Can you give more info on how you are doing that?
> Thanks,
> Colas
>
> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/CABwp0vNu6PQnk%2BAXu8XZ%3D3ef5JYq61GKvg%3DAiLNfEy5wEY44rQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/python_inside_maya/CABwp0vNu6PQnk%2BAXu8XZ%3D3ef5JYq61GKvg%3DAiLNfEy5wEY44rQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
-tony

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAJhmvsTCb4x%3DEiewpnSsiOB6Cm2Lu69REngECByMxn3ej2ZE0Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to